From 59c2b262137e4598df78d42279f759e17efb3c00 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Thu, 20 Apr 2023 20:26:38 +0200 Subject: [PATCH] add if noindex --- roles/deploy-web/files/gouter | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/deploy-web/files/gouter b/roles/deploy-web/files/gouter index 11984ba..45acd03 100644 --- a/roles/deploy-web/files/gouter +++ b/roles/deploy-web/files/gouter @@ -16,9 +16,16 @@ server { #gzip_static off; server_name clarissariviere.com clarissariviere.fr www.clarissariviere.fr www.clarissariviere.com; add_header 'Content-Security-Policy' 'upgrade-insecure-requests'; - add_header Link " rel=\"canonical\", rel=\"alternate\" hreflang=\"fr\""; + #add_header Link " rel=\"canonical\", rel=\"alternate\" hreflang=\"fr\""; proxy_cache STATIC; location / { + set $header " rel=\"canonical\", rel=\"alternate\" hreflang=\"fr\""; + if ($request_uri ~ "/tag/") { + set $header " rel=\"canonical\", rel=\"alternate\" hreflang=\"fr\""; + set $link ""; + + } + add_header Link $header; # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. #try_files $uri $uri/ =404;