Compose: configurable public URL scheme/port (fixes login behind HTTPS)
ORIGIN, PUBLIC_POCKETBASE_URL and PUBLIC_SITE_URL were hard-coded to
http://<sub>.${DOMAIN}:8080. Behind a TLS reverse proxy the browser's
origin is https://<sub>.<domain>, so SvelteKit rejected the admin login
form ("Cross-site POST form submissions are forbidden") and image URLs
pointed at an unreachable port. URL_SCHEME / URL_PORT now build them
(defaults unchanged). Two flat variables because podman-compose 1.5 does
not support nested ${A:-${B}} defaults.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
This commit is contained in:
parent
9fab662bee
commit
7b6c8c2511
4 changed files with 33 additions and 8 deletions
10
.env.example
10
.env.example
|
|
@ -30,6 +30,16 @@ EMAIL_FROM_NAME=Eva Shafik
|
|||
# Timezone used for booking times in emails (IANA name)
|
||||
SITE_TIMEZONE=Europe/Oslo
|
||||
|
||||
# Public URLs the browser uses: <URL_SCHEME>://admin.<DOMAIN><URL_PORT>.
|
||||
# They must match the address bar exactly (SvelteKit's form CSRF check).
|
||||
# Local default: http + :8080. Behind a reverse proxy / TLS on 443, e.g.:
|
||||
# URL_SCHEME=https
|
||||
# URL_PORT=
|
||||
# (empty URL_PORT = no port in the URL; leave the line out to get :8080)
|
||||
DOMAIN=localhost
|
||||
URL_SCHEME=http
|
||||
URL_PORT=:8080
|
||||
|
||||
# Caddy scheme for the reverse proxy on port 8080.
|
||||
# http (default) — plain HTTP; matches the ORIGIN vars in docker-compose.yml
|
||||
# https — HTTPS on :8080 (self-signed unless you add a cert issuer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue