# ----------------------------
# Jellyfin (HTTPS 443)
# ----------------------------
tolkki.freemyip.com {
    reverse_proxy 192.168.40.111:8096
    encode gzip

    header {
        Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
        X-Content-Type-Options "nosniff"
        X-Frame-Options "DENY"
        X-XSS-Protection "1; mode=block"
        Referrer-Policy "no-referrer"
    }

    log {
        output file C:\caddy\jellyfin.log
        format json
    }
}

# Redirect HTTP → HTTPS for Jellyfin
http://tolkki.freemyip.com {
    redir https://tolkki.freemyip.com{uri} permanent
}

# ----------------------------
# CopyParty
# ----------------------------
ftp.tolkki.freemyip.com {
    reverse_proxy 127.0.0.1:8081
    encode gzip

    header {
        Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
        X-Content-Type-Options "nosniff"
        X-Frame-Options "DENY"
        X-XSS-Protection "1; mode=block"
        Referrer-Policy "no-referrer"
    }

    log {
        output file C:\caddy\copyparty.log
        format json
    }
}

# ----------------------------
# RomM Games
# ----------------------------
games.tolkki.freemyip.com {
    reverse_proxy 127.0.0.1:8080
    encode gzip

    header {
        Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
        X-Content-Type-Options "nosniff"
        X-Frame-Options "DENY"
        X-XSS-Protection "1; mode=block"
        Referrer-Policy "no-referrer"
    }

    log {
        output file C:\caddy\romm.log
        format json
    }
}