christ
This commit is contained in:
parent
4bb7d214e8
commit
4360a54b58
1 changed files with 4 additions and 1 deletions
|
|
@ -11,7 +11,10 @@ export async function getCsrfToken(): Promise<string | null> {
|
|||
|
||||
export async function getCsrfTokenAuth(): Promise<string | null> {
|
||||
try {
|
||||
await fetch(CSRF_URL, {});
|
||||
await fetch(CSRF_URL, {
|
||||
method: 'GET',
|
||||
credentials: 'include'
|
||||
});
|
||||
return Cookies.get('csrftoken') || null;
|
||||
} catch (error) {
|
||||
console.error('Failed to get CSRF token:', error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue