-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add simplytranslate caddy config with redirect from lingva
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |