625fc3135a
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 19s
CI / ui (pull_request) Successful in 1m9s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m41s
The offer is the legal document a purchase accepts, needed before real-money intake goes live. Convert the source PDF to an editable ui/legal/offer_ru.md and render it to a standalone static dist/offer/index.html at build (a vite emit-offer plugin using marked); the landing container serves it at /offer/, with a bare /offer redirecting in. Add a small centered "Публичная оферта" footer link on the landing (ru/en) and a CI probe asserting /offer/ serves the page rather than silently falling through to the landing shell.
43 lines
1.4 KiB
Caddyfile
43 lines
1.4 KiB
Caddyfile
# Static landing container. Serves the public landing page and the built
|
|
# assets it references at /; the game SPA (/app/, /telegram/) and the Connect
|
|
# edge stay on the gateway. The contour caddy routes the catch-all here, so
|
|
# stray public paths are absorbed by static file serving and never reach the Go
|
|
# edge. This file is baked into the image at build time (gateway/Dockerfile,
|
|
# target `landing`), not bind-mounted.
|
|
{
|
|
admin off
|
|
}
|
|
|
|
:80 {
|
|
root * /srv
|
|
encode zstd gzip
|
|
|
|
# Mirror the gateway webui caching: hash-named build assets are immutable,
|
|
# every HTML shell is no-cache so a new deploy is picked up immediately.
|
|
header /assets/* Cache-Control "public, max-age=31536000, immutable"
|
|
@shell not path /assets/*
|
|
header @shell Cache-Control "no-cache"
|
|
|
|
# The static public offer page, rendered from ui/legal/offer_ru.md at build
|
|
# time into dist/offer/index.html (vite emit-offer plugin). Served with its own
|
|
# index so /offer/ resolves to /srv/offer/index.html rather than falling to the
|
|
# landing shell below (whose index is landing.html). A bare /offer redirects in.
|
|
handle /offer {
|
|
redir * /offer/ permanent
|
|
}
|
|
handle /offer/* {
|
|
file_server {
|
|
index index.html
|
|
}
|
|
}
|
|
|
|
# An unknown path falls back to the landing shell (the gateway's old "/"
|
|
# behaviour); "/" itself resolves through the index below.
|
|
handle {
|
|
try_files {path} /landing.html
|
|
file_server {
|
|
index landing.html
|
|
}
|
|
}
|
|
}
|