web/common: make API errors more prominent in developer tools (#6637)

* web/common: make API errors more common in developer tools

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* web: default to origin for API urls, this also makes urls in logs clickable

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2023-08-26 17:26:28 +02:00
committed by GitHub
parent 599f7e7c88
commit 15e872762a
2 changed files with 8 additions and 3 deletions

View File

@ -63,7 +63,7 @@ export function getMetaContent(key: string): string {
}
export const DEFAULT_CONFIG = new Configuration({
basePath: process.env.AK_API_BASE_PATH + "/api/v3",
basePath: (process.env.AK_API_BASE_PATH || window.location.origin) + "/api/v3",
headers: {
"sentry-trace": getMetaContent("sentry-trace"),
},