web: add API Drawer

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-03-24 21:16:03 +01:00
parent 533a719914
commit 1275f22599
3 changed files with 92 additions and 1 deletions

View File

@ -4,13 +4,17 @@ import { VERSION } from "../constants";
import { SentryIgnoredError } from "../common/errors";
import { Config, Configuration, RootApi } from "authentik-api";
import { getCookie } from "../utils";
import { MIDDLEWARE } from "../elements/notifications/APIDrawer";
export const DEFAULT_CONFIG = new Configuration({
basePath: "/api/v2beta",
headers: {
"X-CSRFToken": getCookie("authentik_csrf"),
"X-Authentik-Prevent-Basic": "true"
}
},
middleware: [
MIDDLEWARE
],
});
export function configureSentry(): Promise<Config> {