Adjust Caddyfile configuration and prevent Caddy template action conflicts in frontend runtime setup
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
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:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user