# Reverse-proxy config for Tenis Rajec.
#
# This file is imported by the central Caddyfile on the server. Caddy
# provisions and renews the HTTPS certificate automatically. See DEPLOY.md.

tenisrajec.sk {
    encode gzip

    # Long-cache the build-time static assets (CSS, images). They are
    # rebuilt with the image, so a stale cache only lasts until the next deploy.
    @static path /static/*
    header @static Cache-Control "public, max-age=2592000"

    reverse_proxy ht-booking:5150
}

# Send the www host to the bare domain (one canonical URL — also good for SEO).
www.tenisrajec.sk {
    redir https://tenisrajec.sk{uri} permanent
}
