I have the following snippet where I’m trying to take everything after my slash and send it to a remote server. Is there anything I’m doing obviously wrong here?
location ~ ^/(http[s]?:/.*) {
proxy_pass $1; # Ensures correct URL formation
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 600s;
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_ssl_verify off;
}