{
    https_port 8443
    servers {
        protocols h1 h2
    }
}

http://corotation.ai, http://www.corotation.ai {
    bind 0.0.0.0
    redir https://corotation.ai{uri} permanent
}

corotation.ai {
    bind 127.0.0.1
    root * /srv/corotation/current
    encode zstd gzip
    header X-Content-Type-Options nosniff
    header Referrer-Policy strict-origin-when-cross-origin
    @assets path /assets/*
    header @assets Cache-Control "public, max-age=86400"
    file_server
    handle_errors {
        rewrite * /404.html
        file_server
    }
}

www.corotation.ai {
    bind 127.0.0.1
    redir https://corotation.ai{uri} permanent
}
