From 7629b42cf5cab5684301412d36036a783fb9d8b7 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Fri, 23 Dec 2016 22:22:35 -0800 Subject: [PATCH] Redirect from www --- src/Podsync/Caddyfile | 62 ++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/src/Podsync/Caddyfile b/src/Podsync/Caddyfile index 17d9949..6a12e61 100644 --- a/src/Podsync/Caddyfile +++ b/src/Podsync/Caddyfile @@ -1,32 +1,38 @@ -new.podsync.net -gzip +http://podsync.net, https://podsync.net, http://new.podsync.net, https://new.podsync.net, http://localhost:2015 +{ + gzip -errors stdout + errors stdout -ratelimit 2 3 second { - /feed - /download + ratelimit 2 3 second { + /feed + /download + } + + proxy / {%REDIRECT_HOST%}:{%REDIRECT_PORT%} { + header_upstream Host {host} + transparent + } + + tls pavlenko.maksym@gmail.com + + header / { + # Remove ASP.NET specific headers + -Server + -X-Powered-By + -X-Sourcefiles + + # Enable cross-site filter (XSS) and tell browser to block detected attacks + X-XSS-Protection "1; mode=block" + + # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type + X-Content-Type-Options "nosniff" + + # Disallow the site to be rendered within a frame (clickjacking protection) + X-Frame-Options "DENY" + } } -proxy / {%REDIRECT_HOST%}:{%REDIRECT_PORT%} { - header_upstream Host {host} - transparent -} - -tls pavlenko.maksym@gmail.com - -header / { - # Remove ASP.NET specific headers - -Server - -X-Powered-By - -X-Sourcefiles - - # Enable cross-site filter (XSS) and tell browser to block detected attacks - X-XSS-Protection "1; mode=block" - - # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type - X-Content-Type-Options "nosniff" - - # Disallow the site to be rendered within a frame (clickjacking protection) - X-Frame-Options "DENY" -} +www.podsync.net { + redir https://podsync.net{uri} +} \ No newline at end of file