Update web.ssl.template.yml
authorRoldan <RoldanLT@users.noreply.github.com>
Mon, 5 Jun 2017 16:41:16 +0000 (00:41 +0800)
committerGitHub <noreply@github.com>
Mon, 5 Jun 2017 16:41:16 +0000 (00:41 +0800)
Use proper return 301 instead of rewrite for HTTPS redirect

templates/web.ssl.template.yml

index 7c358a932845c4d5e78124b73544919b73d6e45c..76b600eac024815f2eb8b29a4c5c478a56f00967 100644 (file)
@@ -9,7 +9,7 @@ run:
      to: |
        server {
          listen 80;
-         rewrite ^ https://$$ENV_DISCOURSE_HOSTNAME$request_uri? permanent;
+         return 301 https://$$ENV_DISCOURSE_HOSTNAME$request_uri;
        }
        server {
   - replace: