dotnet-buildpack-old icon indicating copy to clipboard operation
dotnet-buildpack-old copied to clipboard

Generated URLs have $PORT appended

Open molnargab opened this issue 10 years ago • 0 comments

During deploying a WCF Service to Heroku, it turned out the generated WSDL picks up the port number of the running nginx server for urls, e.g. instead of http://appname.herokuapp.com it was pointing to http://appname.herokuapp.com:1234, where 1234 is the value of the PORT EnvVar.

As the service on $PORT is not available outside Heroku, the WSDL was pointing to unreachable locations. Heroku Router appends several headers to the request, such as X-Forwarded-Port, which would be the expected port in this case.

Changing fastcgi_param SERVER_PORT $server_port to $http_x_forwarded_port in fastcgi_params fixes this issue (e.g. b26de0ca21d7288782b8ce78ab9cdca88ae644db), but I'm not quite sure whether it will have any side effects.

molnargab avatar Jan 03 '15 20:01 molnargab