root: rename csrf header

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-01-16 16:17:44 +01:00
parent 8008aba450
commit 0db0a12ef3
4 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ export function tenant(): Promise<CurrentTenant> {
export class CSRFMiddleware implements Middleware {
pre?(context: RequestContext): Promise<FetchParams | void> {
// @ts-ignore
context.init.headers["X-CSRFToken"] = getCookie("authentik_csrf");
context.init.headers["X-authentik-CSRF"] = getCookie("authentik_csrf");
return Promise.resolve(context);
}
}