server {
    listen %%interface%%:%%port%% default_server;
    include /etc/nginx/includes/server_params.conf;
    include /etc/nginx/includes/proxy_params.conf;
    client_max_body_size 0;
    root /usr/share/jellyfin;
    index index.html;

    # Security / XSS Mitigation Headers
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    location = / {
        absolute_redirect off; # Do not add port to redirect
        return 301 ./web/index.html;  # The slash at the end is important.
        proxy_set_header X-Forwarded-Proto $scheme; # Avoids mixed content
    }

    location / {
        proxy_pass http://127.0.0.1:8096;
        proxy_buffering off;
        proxy_read_timeout 30;
        proxy_pass_request_headers on;
    }

}
