ministryofjustice / justice-gov-uk

Justice UK website
https://www.justice.gov.uk/
MIT License
2 stars 0 forks source link

Feature/cdpt 1534 use nginx for redirects amends #203

Closed EarthlingDavey closed 5 months ago

EarthlingDavey commented 5 months ago

nginx is running in the context that incoming requests are http and port 8080.

This can be seen by a bug that I've identified e.g. on stage https://stage.justice.gov.uk/wp-content/uploads/test will redirect to http://stage.justice.gov.uk:8080/app/uploads/test , then https://stage.justice.gov.uk:8080/app/uploads/test

This fix will use relative paths for redirects, avoiding the above issue.

See: https://www.rfc-editor.org/rfc/rfc9110.html#section-10.2.2