MCPcopy Create free account
hub / github.com/explorerhq/sql-explorer / getCsrfToken

Function getCsrfToken

explorer/src/js/csrf.js:6–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4const csrfTokenInDOM = document.getElementById('csrfTokenInDOM').value === "True";
5
6export function getCsrfToken() {
7 if (csrfTokenInDOM) {
8 let csrfInput = document.querySelector('input[name="csrfmiddlewaretoken"]');
9 return csrfInput ? csrfInput.value : null;
10 }
11 return cookie.get(csrfCookieName);
12}

Callers 7

uploadFileFunction · 0.90
setupUploadsFunction · 0.90
formatSqlMethod · 0.90
getAssistantHistoryFunction · 0.90
submitAssistantAskFunction · 0.90
toggleFavoriteFunction · 0.90
handleEmailCsvSubmitFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected