Skip to content
ArenileArenile
Coste360.itCoste360.it

Reverse proxy and HTTPS

HTTPS is mandatory in production: it protects passwords and customer data, enables the panel’s secure cookies and is required by browsers to pay inside an iframe. There are two ways.

The proxy receives HTTPS traffic and forwards it to Arenile on 127.0.0.1:8080.

Caddy obtains and renews the certificate on its own:

/etc/caddy/Caddyfile
prenota.mio-lido.it {
reverse_proxy 127.0.0.1:8080
}

Then, always, tell Arenile which proxies to trust to read the real client IP:

.env
ARENILE_TRUSTED_PROXIES=127.0.0.1/32
# or the proxy's Docker network, for example 172.18.0.0/16

Without a proxy, Arenile can obtain and renew Let’s Encrypt certificates on its own:

.env
ARENILE_TLS_AUTOCERT_DOMAINS=prenota.mio-lido.it

Ports 80 and 443 of the server must reach the container: in the official compose file uncomment the "80:80" and "443:443" lines. Certificates are saved in the data folder.

Arenile sets the security headers itself, whatever the proxy:

Header Value
Strict-Transport-Security max-age=63072000; includeSubDomains (HTTPS only)
Content-Security-Policy strict on the panel and the APIs; on the public page frame-ancestors is built from the establishment’s allowed websites
X-Content-Type-Options nosniff
Referrer-Policy strict-origin-when-cross-origin

Do not add an X-Frame-Options or a different frame-ancestors from the proxy: it would prevent embedding the widget in the allowed websites.