Skip to content

Commit

Permalink
Disaled CSRF for GQL endpoint, which uses JWT anyway.
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanLawrence committed May 4, 2019
1 parent ffa572f commit a32f688
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion am/am/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from django.conf.urls.static import static
from django.conf.urls import handler404, handler500
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt

from graphene_django.views import GraphQLView

Expand All @@ -20,7 +21,7 @@
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^$', HomePageView.as_view()),
url(r'^graphql', GraphQLView.as_view(graphiql=True)),
url(r'^graphql', csrf_exempt(GraphQLView.as_view(graphiql=True))),
url(r'^bills/$', BillsHomeView.as_view()),
url(r'^people/$', PeopleHomeView.as_view()),
url(r'^bills/(?P<id>[\w-]+)/$', BillDetailView.as_view(), name='bill'),
Expand Down

0 comments on commit a32f688

Please sign in to comment.