After shipping in Heroku, a hack was added to allow a production build to force HTTPS on the generated URLs that are returned when mapping from the repository to the JSON response. This is because Heroku's load balancers terminate SSL/TLS and hit applications directly using HTTP.
This hack introduced two undesirable changes:
- A new environment variable was added, which should not be necessary.
- The
Request object is directly modified to have IsHttps = true.
A possible solution is to modify the incoming request using some middleware, possibly after detecting the standard ASPNETCORE_ENVIRONMENT variable.
After shipping in Heroku, a hack was added to allow a production build to force HTTPS on the generated URLs that are returned when mapping from the repository to the JSON response. This is because Heroku's load balancers terminate SSL/TLS and hit applications directly using HTTP.
This hack introduced two undesirable changes:
Requestobject is directly modified to haveIsHttps = true.A possible solution is to modify the incoming request using some middleware, possibly after detecting the standard
ASPNETCORE_ENVIRONMENTvariable.