map $host $git { default gitlab; }

server {
    listen      80;
    listen      [::]:80;
    server_name git.shore.co.il;
    include     snippets/robots-allow-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;
    listen      [::]:443 ssl;
    server_name git.shore.co.il;
    include     snippets/robots-allow-all.conf;
    include     snippets/ads-txt.conf;
    include     snippets/security-txt.conf;
    include     snippets/ssl.conf;

    location / {
        proxy_pass              http://$git$request_uri;
        proxy_http_version      1.1;
        include                 snippets/proxy-headers.conf;
        proxy_set_header        X-Forwarded-Ssl on;
        client_max_body_size    512m;
    }
}