diff --git a/conf.d/global.conf b/conf.d/global.conf index 664abdf91882c342448c06bdd5fd05b40e8c6692..fe97f485991fe8a600b9e442a8ac0fadcdbf0488 100644 --- a/conf.d/global.conf +++ b/conf.d/global.conf @@ -4,4 +4,5 @@ gzip on; tcp_nopush on; tcp_nodelay on; server_tokens off; -include snippets/common-headers.conf; +include snippets/common-headers.conf; +include snippets/ads-txt.conf; diff --git a/snippets/ads-txt.conf b/snippets/ads-txt.conf new file mode 100644 index 0000000000000000000000000000000000000000..b074c08328eef2bc8a18f41937ff787ceacbe6ba --- /dev/null +++ b/snippets/ads-txt.conf @@ -0,0 +1,9 @@ +location = /ads.txt { + if ($scheme = http) { + return 301 https://$host$request_uri; + } + if ($scheme = https) { + add_header Content-Type "text/plain; charset=utf-8"; + return 200 "contact=webmaster@shore.co.il\n"; + } +}