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,8 +1,6 @@
|
|||
{
|
||||
auto_https off
|
||||
servers {
|
||||
metrics
|
||||
}
|
||||
metrics
|
||||
}
|
||||
|
||||
:4000 {
|
||||
|
|
|
|||
|
|
@ -33,11 +33,12 @@
|
|||
const config = JSON.parse(configJson);
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
|
||||
const tmplPrefix = '{' + '{'; // Verhindert, dass Caddy '{{' als Template-Action interpretiert
|
||||
const apiFromCaddy = config.apiBaseUrl;
|
||||
const apiOverride = params.get('apiBaseUrl');
|
||||
globalThis.API_BASE_URL = apiOverride
|
||||
? apiOverride.replace(/\/$/, '')
|
||||
: (apiFromCaddy && !apiFromCaddy.startsWith('{{')
|
||||
: (apiFromCaddy && !apiFromCaddy.startsWith(tmplPrefix)
|
||||
? apiFromCaddy.replace(/\/$/, '')
|
||||
: 'http://' + window.location.origin.replace(/\/$/, ''));
|
||||
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
const kcOverride = params.get('keycloakUrl');
|
||||
globalThis.KEYCLOAK_URL = kcOverride
|
||||
? kcOverride.replace(/\/$/, '')
|
||||
: (kcFromCaddy && !kcFromCaddy.startsWith('{{')
|
||||
: (kcFromCaddy && !kcFromCaddy.startsWith(tmplPrefix)
|
||||
? kcFromCaddy.replace(/\/$/, '')
|
||||
: 'http://' + window.location.hostname + ':8180');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user