我用 graphene-django
.创建应用程序,GraphiQL
适用于登录和其他功能。但是当我使用 Insomnia
, 我得到一个 403 Forbidden
错误。
我引用了这个文档,
https://github.com/howtographql/howtographql/blob/master/content/backend/graphql-python/4-authentication.md
我试过:
csrf_exempt
;它工作正常,但我当然不会使用它。 django-cors-headers
;确实如此 不是 工作得很好。 我该如何解决这个问题
403
错误?
最佳答案
假设您有 http://127.0.0.1:8000/graphql/并使用 JWT。
按照这个截图,也许他们可以帮助你。
关于django - 403 由 Graphite 烯-django。不要使用 csrf_exempt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51764452/