justsml/ssl-proxy

Allow for deciding what the Host request header is set to

Closed this issue · 0 comments

arel commented

Currently, the Host request header is always set to the nginx $host variable, which breaks some use cases.

    ...
    proxy_set_header Host \$host;
    ...

One consequence of using the $host value is that the port number is removed. If serving from a non-standard SSL port, this can cause an issue. In my case, MinIO (Basically, Amazon S3) expects each request to be signed, headers and all. Modifying the host value (by stripping the port number) breaks this. This can be fixed by using $http_host instead of $host (or by setting the host and port number explicitly.)