mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-07-23 03:41:03 +00:00
Stop using Netlify for production hosting (#2472)
Signed-off-by: Daniel Gray <dngray@privacyguides.org>
This commit is contained in:
42
config/caddy/common/30-errors.caddy
Normal file
42
config/caddy/common/30-errors.caddy
Normal file
@@ -0,0 +1,42 @@
|
||||
handle_errors {
|
||||
@errors `{err.status_code} in [404]`
|
||||
handle @errors {
|
||||
handle @es {
|
||||
try_files /i18n/{err.status_code}.es.html i18n/{err.status_code}.en.html
|
||||
file_server
|
||||
}
|
||||
handle @fr {
|
||||
try_files i18n/{err.status_code}.fr.html i18n/{err.status_code}.en.html
|
||||
file_server
|
||||
}
|
||||
handle @he {
|
||||
try_files i18n/{err.status_code}.he.html i18n/{err.status_code}.en.html
|
||||
file_server
|
||||
}
|
||||
handle @it {
|
||||
try_files i18n/{err.status_code}.it.html i18n/{err.status_code}.en.html
|
||||
file_server
|
||||
}
|
||||
handle @nl {
|
||||
try_files i18n/{err.status_code}.nl.html i18n/{err.status_code}.en.html
|
||||
file_server
|
||||
}
|
||||
handle @ru {
|
||||
try_files i18n/{err.status_code}.ru.html i18n/{err.status_code}.en.html
|
||||
file_server
|
||||
}
|
||||
handle @zh-Hant {
|
||||
try_files i18n/{err.status_code}.zh-Hant.html i18n/{err.status_code}.en.html
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
try_files i18n/{err.status_code}.en.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
|
||||
# Handle all other webserver errors with a simple text response
|
||||
handle {
|
||||
respond "{err.status_code} {err.status_text}"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user