fix: configure frontend same-origin API for NAS compose

This commit is contained in:
devRaGonSa
2026-05-23 14:42:25 +02:00
parent 91ce48ce0a
commit 10f27d27f0

View File

@@ -43,6 +43,18 @@ services:
frontend: frontend:
build: build:
context: ../../frontend context: ../../frontend
command:
- sh
- -c
- |
python - <<'PY'
from pathlib import Path
for path in Path('/srv/frontend').glob('*.html'):
text = path.read_text(encoding='utf-8')
text = text.replace('data-backend-base-url="http://127.0.0.1:8000"', 'data-backend-base-url=""')
path.write_text(text, encoding='utf-8')
PY
python -m http.server 8080 --bind 0.0.0.0 --directory /srv/frontend
expose: expose:
- "8080" - "8080"
depends_on: depends_on: