Skip to content

Commit

Permalink
adding the disable introspection middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
pushyamig committed Nov 17, 2023
1 parent e2e2e45 commit 37ec5ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches:
- master
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*' # 2021.01.01
- i1544_backend_dependencies

env:
IMAGE_TAG: latest
Expand All @@ -14,7 +15,7 @@ env:
jobs:
build:
# to test a feature, change the repo name to your github id
if: github.repository_owner == 'tl-its-umich-edu'
if: github.repository_owner == 'pushyamig'
runs-on: ubuntu-latest
steps:

Expand Down
4 changes: 3 additions & 1 deletion dashboard/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

from django.views.decorators.cache import cache_page

from dashboard.middleware.disableintrospection import DisableIntrospectionMiddleware

from . import views

import watchman.views
Expand All @@ -42,7 +44,7 @@
path('admin/', admin.site.urls),

# Note the absence of a trailing slash; adding one breaks the GraphQL implementation.
path('graphql', DashboardGraphQLView.as_view(graphiql=settings.DEBUG)),
path('graphql', DashboardGraphQLView.as_view( middleware=[] if settings.DEBUG else [DisableIntrospectionMiddleware],graphiql=settings.DEBUG)),

# This is the courses catch-all. Most user-initiated requests will match the regular expression; then the React
# front-end will manage any additional routing.
Expand Down

0 comments on commit 37ec5ae

Please sign in to comment.