mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-06 05:13:11 +03:00
parent
2600f0f041
commit
189a586cfb
|
@ -23,12 +23,10 @@ add "&raw" to the end of the URL within a browser.
|
||||||
<script src="//cdn.jsdelivr.net/graphiql/{{graphiql_version}}/graphiql.min.js"></script>
|
<script src="//cdn.jsdelivr.net/graphiql/{{graphiql_version}}/graphiql.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
{% csrf_token %}
|
||||||
<script>
|
<script>
|
||||||
// Parse the cookie value for a CSRF token
|
// Parse the cookie value for a CSRF token
|
||||||
var csrftoken;
|
var csrftoken = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||||
var cookies = ('; ' + document.cookie).split('; csrftoken=');
|
|
||||||
if (cookies.length == 2)
|
|
||||||
csrftoken = cookies.pop().split(';').shift();
|
|
||||||
|
|
||||||
// Collect the URL parameters
|
// Collect the URL parameters
|
||||||
var parameters = {};
|
var parameters = {};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user