Fix swagger Try it out and make endpoints work

This commit is contained in:
Cristi Vîjdea
2017-12-21 17:12:58 +01:00
parent 7683a28816
commit 8a8a9faeeb
7 changed files with 51 additions and 12 deletions
@@ -163,7 +163,14 @@
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
layout: "StandaloneLayout",
filter: true,
requestInterceptor: function(request) {
console.log(request);
var headers = request.headers || {};
headers["X-CSRFToken"] = document.querySelector("[name=csrfmiddlewaretoken]").value;
return request;
}
};
var swaggerSettings = {};