From eeca551e86fcc6bb20c560adf3409efe56f61bc4 Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 21 Feb 2023 03:23:00 +0100 Subject: [PATCH] testing webserver header --- .../files/nginx/sites/example.com_tls.conf | 26 +++++++++++++++++++ .../nginx/sites/test.winkekatze.tv_tls.conf | 26 +++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/templates/files/nginx/sites/example.com_tls.conf b/templates/files/nginx/sites/example.com_tls.conf index c7ef84f..8e6a2c0 100644 --- a/templates/files/nginx/sites/example.com_tls.conf +++ b/templates/files/nginx/sites/example.com_tls.conf @@ -1,3 +1,9 @@ +{{ ansible_managed | comment }} +{# + +:%s/example.com/test.winkekatze.tv/gc + +#} server { listen 443 ssl http2; listen [::]:443 ssl http2; @@ -13,5 +19,25 @@ server { location / { charset utf-8; try_files $uri $uri/ =404; + add_header Access-Control-Allow-Origin *; + add_header Cache-Control "public, max-age=0"; + add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; } + location ~* .(?:css|js)$ { + charset utf-8; + try_files $uri $uri/ =404; + add_header Access-Control-Allow-Origin *; + expires 2h; + add_header Cache-Control "public"; + add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; + } + location stream.m3u8 { + types { } default_type "application/x-mpegURL; charset=utf-8"; + charset utf-8; + try_files $uri $uri/ =404; + add_header Cache-Control "public, max-age=0"; + add_header Access-Control-Allow-Origin *; + add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; + } + } diff --git a/templates/files/nginx/sites/test.winkekatze.tv_tls.conf b/templates/files/nginx/sites/test.winkekatze.tv_tls.conf index bad94cf..9583880 100644 --- a/templates/files/nginx/sites/test.winkekatze.tv_tls.conf +++ b/templates/files/nginx/sites/test.winkekatze.tv_tls.conf @@ -1,3 +1,9 @@ +{{ ansible_managed | comment }} +{# + +:%s/example.com/test.winkekatze.tv/gc + +#} server { listen 443 ssl http2; listen [::]:443 ssl http2; @@ -13,5 +19,25 @@ server { location / { charset utf-8; try_files $uri $uri/ =404; + add_header Access-Control-Allow-Origin *; + add_header Cache-Control "public, max-age=0"; + add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; } + location ~* .(?:css|js)$ { + charset utf-8; + try_files $uri $uri/ =404; + add_header Access-Control-Allow-Origin *; + expires 2h; + add_header Cache-Control "public"; + add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; + } + location stream.m3u8 { + types { } default_type "application/x-mpegURL; charset=utf-8"; + charset utf-8; + try_files $uri $uri/ =404; + add_header Cache-Control "public, max-age=0"; + add_header Access-Control-Allow-Origin *; + add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; + } + }