build(deps): bump @sentry/browser from 6.19.4 to 7.0.0 in /web (#3008)

This commit is contained in:
dependabot[bot]
2022-06-01 11:15:52 +02:00
committed by GitHub
parent 0cac034512
commit 5a81ae956f
6 changed files with 728 additions and 925 deletions

View File

@ -3,7 +3,6 @@ import { getCookie } from "../utils";
import { APIMiddleware } from "../elements/notifications/APIDrawer";
import { MessageMiddleware } from "../elements/messages/Middleware";
import { VERSION } from "../constants";
import { getMetaContent } from "@sentry/tracing/dist/browser/browsertracing";
export class LoggingMiddleware implements Middleware {
@ -58,10 +57,16 @@ export class CSRFMiddleware implements Middleware {
}
}
export function getMetaContent(key: string): string {
const metaEl = document.querySelector<HTMLMetaElement>(`meta[name=${key}]`);
if (!metaEl) return "";
return metaEl.content;
}
export const DEFAULT_CONFIG = new Configuration({
basePath: process.env.AK_API_BASE_PATH + "/api/v3",
headers: {
"sentry-trace": getMetaContent("sentry-trace") || "",
"sentry-trace": getMetaContent("sentry-trace"),
},
middleware: [
new CSRFMiddleware(),

View File

@ -9,7 +9,7 @@ import { Config } from "@goauthentik/api";
export const TAG_SENTRY_COMPONENT = "authentik.component";
export const TAG_SENTRY_CAPABILITIES = "authentik.capabilities";
export function configureSentry(canDoPpi: boolean = false): Promise<Config> {
export function configureSentry(canDoPpi = false): Promise<Config> {
return config().then((config) => {
if (config.errorReporting.enabled) {
Sentry.init({

File diff suppressed because it is too large Load Diff