Adjust Caddyfile configuration and prevent Caddy template action conflicts in frontend runtime setup
All checks were successful
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m55s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 6m56s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 1m55s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m37s
All checks were successful
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m55s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 6m56s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 1m55s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m37s
This commit is contained in:
parent
c67b285c97
commit
a202d3d817
|
|
@ -1,9 +1,7 @@
|
||||||
{
|
{
|
||||||
auto_https off
|
auto_https off
|
||||||
servers {
|
|
||||||
metrics
|
metrics
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
:4000 {
|
:4000 {
|
||||||
root * /usr/share/caddy
|
root * /usr/share/caddy
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,12 @@
|
||||||
const config = JSON.parse(configJson);
|
const config = JSON.parse(configJson);
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
|
const tmplPrefix = '{' + '{'; // Verhindert, dass Caddy '{{' als Template-Action interpretiert
|
||||||
const apiFromCaddy = config.apiBaseUrl;
|
const apiFromCaddy = config.apiBaseUrl;
|
||||||
const apiOverride = params.get('apiBaseUrl');
|
const apiOverride = params.get('apiBaseUrl');
|
||||||
globalThis.API_BASE_URL = apiOverride
|
globalThis.API_BASE_URL = apiOverride
|
||||||
? apiOverride.replace(/\/$/, '')
|
? apiOverride.replace(/\/$/, '')
|
||||||
: (apiFromCaddy && !apiFromCaddy.startsWith('{{')
|
: (apiFromCaddy && !apiFromCaddy.startsWith(tmplPrefix)
|
||||||
? apiFromCaddy.replace(/\/$/, '')
|
? apiFromCaddy.replace(/\/$/, '')
|
||||||
: 'http://' + window.location.origin.replace(/\/$/, ''));
|
: 'http://' + window.location.origin.replace(/\/$/, ''));
|
||||||
|
|
||||||
|
|
@ -45,7 +46,7 @@
|
||||||
const kcOverride = params.get('keycloakUrl');
|
const kcOverride = params.get('keycloakUrl');
|
||||||
globalThis.KEYCLOAK_URL = kcOverride
|
globalThis.KEYCLOAK_URL = kcOverride
|
||||||
? kcOverride.replace(/\/$/, '')
|
? kcOverride.replace(/\/$/, '')
|
||||||
: (kcFromCaddy && !kcFromCaddy.startsWith('{{')
|
: (kcFromCaddy && !kcFromCaddy.startsWith(tmplPrefix)
|
||||||
? kcFromCaddy.replace(/\/$/, '')
|
? kcFromCaddy.replace(/\/$/, '')
|
||||||
: 'http://' + window.location.hostname + ':8180');
|
: 'http://' + window.location.hostname + ':8180');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user