map $host $kodi { default 172.18.0.1; }

server {
    listen      80;
    listen      [::]:80;
    server_name kodi.shore.co.il;
    include     snippets/robots-disallow-all.conf;
    include     snippets/ads-txt.conf;
    include     snippets/security-txt.conf;
    include     snippets/www-acme-challenge.conf;
    include     snippets/redirect-https.conf;
}

server {
    listen      443 ssl http2;
    listen      [::]:443 ssl http2;
    server_name kodi.shore.co.il;
    include     snippets/robots-disallow-all.conf;
    include     snippets/ads-txt.conf;
    include     snippets/security-txt.conf;
    include     snippets/ssl.conf;
    include     snippets/ldap-auth.conf;

    location / {
        proxy_pass              http://$kodi:8080;
        proxy_http_version      1.1;
        include                 snippets/proxy-headers.conf;
        include                 snippets/websockets.conf;
    }
}