diff --git a/roles/deploy-web/files/gouter b/roles/deploy-web/files/gouter index 3097af3..91dabe8 100644 --- a/roles/deploy-web/files/gouter +++ b/roles/deploy-web/files/gouter @@ -1,16 +1,15 @@ server { if ($host = clarissariviere.fr) { - return 301 https://"www.clarissariviere.fr"$request_uri; + return 301 "https://www.clarissariviere.com$request_uri"; + } # managed by Certbot + if ($host = www.clarissariviere.fr) { + return 301 "https://www.clarissariviere.com$request_uri"; } # managed by Certbot if ($host = clarissariviere.com) { - return 301 https://"www.clarissariviere.com"$request_uri; + return 301 "https://www.clarissariviere.com$request_uri"; } # managed by Certbot - set $link 'canonical'; - if ($host = www.clarissariviere.fr) { - set $link "alternate\" hreflang=\"fr"; - } access_log /var/log/nginx/clarissa_access.log main; error_log /var/log/nginx/clarissa_error.log; #gzip_static off; @@ -18,9 +17,9 @@ server { add_header 'Content-Security-Policy' 'upgrade-insecure-requests'; #add_header Link " rel=\"canonical\", rel=\"alternate\" hreflang=\"fr\""; proxy_cache STATIC; - set $header " rel=\"canonical\", rel=\"alternate\" hreflang=\"fr\""; + set $header " rel=\"canonical\""; if ($request_uri ~ "/tag/") { - set $header " rel=\"canonical\", rel=\"alternate\" hreflang=\"fr\""; + set $header " rel=\"canonical\""; set $link ""; } @@ -46,7 +45,6 @@ server { #proxy_set_header X-Real-IP $remote_addr; #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #proxy_set_header X-Forwarded-Proto $scheme; - sub_filter 'canonical' "$link"; sub_filter 'http://gouters.canalblog.com' "https://$host"; sub_filter '' ''; sub_filter '