From 772e6fb55adbe3431811b1f7982a7932485947eb Mon Sep 17 00:00:00 2001 From: FarisZR <35614734+FarisZR@users.noreply.github.com> Date: Sat, 8 Jun 2024 00:21:35 +0200 Subject: [PATCH] add simplytranslate caddy config with redirect from lingva --- caddy/config/simplytranslate.caddy | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 caddy/config/simplytranslate.caddy diff --git a/caddy/config/simplytranslate.caddy b/caddy/config/simplytranslate.caddy new file mode 100644 index 0000000..0657d88 --- /dev/null +++ b/caddy/config/simplytranslate.caddy @@ -0,0 +1,29 @@ +lingva.aosus.org { + redir https://simplytranslate.aosus.link{uri} 301 + header Cache-Control "max-age=2592000, stale-while-revalidate=2592000" +} + +lingva.aosus.link { + redir https://simplytranslate.aosus.link{uri} 301 + header Cache-Control "max-age=2592000, stale-while-revalidate=2592000" +} + +simplytranslate.aosus.link { + reverse_proxy simplytranslate:5000 + respond /robots.txt 200 { + body "User-agent: * +Disallow: /" + } + handle_errors { + # handle_errors is only triggerd on erros from Caddy and not the proxy, that's why we don't specifiy any errors here. + rewrite * /proxy_error_page.html + file_server { + root /srv/ + } + } + header { + X-Robots-Tag "noindex, noarchive, nofollow, nosnippet" + X-XSS-Protection "1; mode=block" + } + encode zstd gzip +} \ No newline at end of file