{
    email {$STAGING_TLS_EMAIL}
    admin off
}

(staff_only) {
    @blocked not remote_ip {$STAGING_ALLOWED_CIDRS}
    respond @blocked "Private staff staging" 403
    header {
        X-Robots-Tag "noindex, nofollow, noarchive"
        X-Content-Type-Options "nosniff"
        Referrer-Policy "no-referrer"
        X-Frame-Options "DENY"
        Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=(), usb=()"
        -Server
    }
    request_body {
        max_size 20MB
    }
}

{$STAGING_WEB_HOST} {
    import staff_only
    reverse_proxy web:3000
}

{$STAGING_API_HOST} {
    import staff_only
    @documentation path /docs /docs/* /redoc /openapi.json
    respond @documentation 404
    reverse_proxy api:8000
}
