Closed shawnhind closed 4 years ago
I've changed the request configuration setup somewhat.
Something like this should work now (when using the latest release):
const yasgui = new Yasgui(document.getElementById("yasgui"), {
requestConfig: {
endpoint: "{{ route('sparql.query') }}",
headers: () => ({
"X-CSRF-TOKEN": someCsrfToken
})
},
copyEndpointOnNewTab: false
});
Great, thanks. I'll give this a try later today.
@LaurensRietveld this worked perfectly, thanks.
Great :+1:
We're using YASGUI to query our graph database and our query endpoint uses a CSRF token for session validation.
I'm initializing YASGUI doing this:
However after logging out and logging back in and then reloading the page, YASGUI is still sending the original header with the expired CSRF token which I assume it's getting from the cached config in local storage.
How can I modify config values in a way that will override the saved local storage values. Is there a way other than to run code that will clear the local storage object?