Skip to content
Snippets Groups Projects
Commit b3399fea authored by jan.bednarik's avatar jan.bednarik
Browse files

Extempt graphql API from CSRF.

parent 18715f8a
No related branches found
No related tags found
No related merge requests found
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from graphene_django.views import GraphQLView from graphene_django.views import GraphQLView
from openlobby.core.views import IndexView, LoginRedirectView from openlobby.core.views import IndexView, LoginRedirectView
...@@ -8,5 +9,5 @@ urlpatterns = [ ...@@ -8,5 +9,5 @@ urlpatterns = [
path('', IndexView.as_view(), name='index'), path('', IndexView.as_view(), name='index'),
path('login-redirect', LoginRedirectView.as_view(), name='login-redirect'), path('login-redirect', LoginRedirectView.as_view(), name='login-redirect'),
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('graphql', GraphQLView.as_view(graphiql=True)), path('graphql', csrf_exempt(GraphQLView.as_view(graphiql=True))),
] ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment