<div dir="ltr"><div>Здравствуйте! <br></div><div>nginx 1.19.3 1.20.0<br></div><div>есть следующая конфигурация сервера <br>
<p><strong>mysite.org.ssl.conf</strong></p>
<pre><code>   server {
            listen 443 ssl http2;
            listen [::]:443 ssl http2;
            server_name  <a href="http://mysite.org">mysite.org</a>;
            access_log /var/log/nginx/<a href="http://mysite.org/access.log">mysite.org/access.log</a> extended;
            error_log /var/log/nginx/<a href="http://mysite.org/error.log">mysite.org/error.log</a>;
            ssl_certificate "/etc/letsencrypt/live/<a href="http://mysite.org/fullchain.pem">mysite.org/fullchain.pem</a>";
            ssl_certificate_key "/etc/letsencrypt/live/<a href="http://mysite.org/privkey.pem">mysite.org/privkey.pem</a>";
            include ssl_config;
    
    location / {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_set_header Connection "Keep-Alive";
            proxy_set_header Proxy-Connection "Keep-Alive";
            proxy_connect_timeout 7200s;
            proxy_read_timeout 7200s;
            proxy_send_timeout 7200s;
            client_max_body_size 7M;
            proxy_pass <a href="http://mysite.backend.local:80">http://mysite.backend.local:80</a>;
        }
    }
</code></pre>

нашел потенциальный фишинговый кейс, если клиент перейдет по ссылке типа <br></div><div>https://<em><a href="http://mysite.org//example.org">mysite.org//example.org</a></em>

<br></div><div>nginx сделает 301 редирект на сайт злоумышленника (<a href="http://example.org">example.org</a>) даже не переходя на апстрим /<br></div><div><pre><code>GET ///<a href="http://example.org/">example.org/</a> HTTP/2.0 301 291 219 "-" "useragent" "-" 0.000 - -<br></code></pre><pre><code>подскажите, как контролировать подобные кейсы, запретив переход по на сторонний ресурс ?

</code></pre>

</div></div>