Send 308 status on redirect from http to https

Modify nginx configuration to use 308 instead of 301 on the http to
https redirect.
Fix problems with some clients on POST requests that are transformed to
GET on 301 redirect (per HTTP 1.1 standard).
See [RFC7538](https://tools.ietf.org/html/rfc7538).

Signed-off-by: Stéphane Albert <sheeprine@oh.its.fake.nullplace.com>
This commit is contained in:
Stéphane Albert 2018-10-23 20:04:58 +02:00
parent 7c78e3576a
commit 0d44e4f535

View File

@ -141,6 +141,6 @@ http {
server {
listen 80;
#server_name harbordomain.com;
return 301 https://$$host$$request_uri;
return 308 https://$$host$$request_uri;
}
}