Skip to content
Snippets Groups Projects
Commit 1af117ef authored by Kev Kloss's avatar Kev Kloss :m:
Browse files

Redirect HTTP to HTTPS when using HTTPS

This improves the behavior when connecting to gdk.test via HTTP when you
have HTTPS enabled.

Instead of responding with a 497 status code and error page, we redirect
to the same URI but using HTTPS.
parent e71676ea
No related branches found
No related tags found
1 merge request!4562Redirect HTTP to HTTPS when using HTTPS
......@@ -71,6 +71,8 @@ http {
<%= 'http2 on;' if config.https? && config.nginx.http2? %>
<%- if config.https? -%>
error_page 497 =307 https://<%= config.hostname %>:<%= config.port %>$request_uri;
ssl_certificate <%= gdk_root.join(config.nginx.ssl.certificate) %>;
ssl_certificate_key <%= gdk_root.join(config.nginx.ssl.key) %>;
<%- end -%>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment