mirror of
https://codeberg.org/Freedium-cfd/web.git
synced 2026-03-11 09:04:37 +00:00
Caddy: Add Cloudflare challenge page to the ignore path list
This commit is contained in:
parent
64983a2038
commit
adf6fdfadf
3 changed files with 128 additions and 120 deletions
122
CaddyfileDev
122
CaddyfileDev
|
|
@ -4,73 +4,23 @@
|
|||
header -Server
|
||||
|
||||
|
||||
handle_path /android-chrome-192x192.png {
|
||||
root * ./static/android-chrome-192x192.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /android-chrome-512x512.png {
|
||||
root * ./static/android-chrome-512x512.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /robots.txt {
|
||||
root * ./static/robots.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /site.webmanifest {
|
||||
root * ./static/site.webmanifest
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /browserconfig.xml {
|
||||
root * ./static/browserconfig.xml
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-144x144.png {
|
||||
root * ./static/mstile-144x144.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /favicon-32x32.png {
|
||||
root * ./static/favicon-32x32.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /apple-touch-icon.png {
|
||||
root * ./static/apple-touch-icon.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /humans.txt {
|
||||
root * ./static/humans.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-150x150.png {
|
||||
root * ./static/mstile-150x150.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /sitemap.xml {
|
||||
root * ./static/sitemap.xml
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /android-chrome-192x192.png {
|
||||
root * ./static/android-chrome-192x192.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /security.txt {
|
||||
root * ./static/security.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /safari-pinned-tab.svg {
|
||||
root * ./static/safari-pinned-tab.svg
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-310x310.png {
|
||||
root * ./static/mstile-310x310.png
|
||||
handle_path /browserconfig.xml {
|
||||
root * ./static/browserconfig.xml
|
||||
file_server
|
||||
}
|
||||
|
||||
|
|
@ -79,18 +29,68 @@
|
|||
file_server
|
||||
}
|
||||
|
||||
handle_path /favicon-32x32.png {
|
||||
root * ./static/favicon-32x32.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /favicon.ico {
|
||||
root * ./static/favicon.ico
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /humans.txt {
|
||||
root * ./static/humans.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-144x144.png {
|
||||
root * ./static/mstile-144x144.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-150x150.png {
|
||||
root * ./static/mstile-150x150.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-310x150.png {
|
||||
root * ./static/mstile-310x150.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-310x310.png {
|
||||
root * ./static/mstile-310x310.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-70x70.png {
|
||||
root * ./static/mstile-70x70.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /favicon.ico {
|
||||
root * ./static/favicon.ico
|
||||
handle_path /robots.txt {
|
||||
root * ./static/robots.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /safari-pinned-tab.svg {
|
||||
root * ./static/safari-pinned-tab.svg
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /security.txt {
|
||||
root * ./static/security.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /site.webmanifest {
|
||||
root * ./static/site.webmanifest
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /sitemap.xml {
|
||||
root * ./static/sitemap.xml
|
||||
file_server
|
||||
}
|
||||
|
||||
|
|
@ -158,6 +158,10 @@
|
|||
respond "Access denied" 403
|
||||
}
|
||||
|
||||
handle_path /cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1 {
|
||||
respond "Access denied" 403
|
||||
}
|
||||
|
||||
route /* {
|
||||
reverse_proxy web:7080
|
||||
}
|
||||
|
|
|
|||
122
CaddyfileProd
122
CaddyfileProd
|
|
@ -5,73 +5,23 @@ freedium.cfd {
|
|||
header -Server
|
||||
|
||||
|
||||
handle_path /android-chrome-192x192.png {
|
||||
root * ./static/android-chrome-192x192.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /android-chrome-512x512.png {
|
||||
root * ./static/android-chrome-512x512.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /robots.txt {
|
||||
root * ./static/robots.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /site.webmanifest {
|
||||
root * ./static/site.webmanifest
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /browserconfig.xml {
|
||||
root * ./static/browserconfig.xml
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-144x144.png {
|
||||
root * ./static/mstile-144x144.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /favicon-32x32.png {
|
||||
root * ./static/favicon-32x32.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /apple-touch-icon.png {
|
||||
root * ./static/apple-touch-icon.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /humans.txt {
|
||||
root * ./static/humans.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-150x150.png {
|
||||
root * ./static/mstile-150x150.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /sitemap.xml {
|
||||
root * ./static/sitemap.xml
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /android-chrome-192x192.png {
|
||||
root * ./static/android-chrome-192x192.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /security.txt {
|
||||
root * ./static/security.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /safari-pinned-tab.svg {
|
||||
root * ./static/safari-pinned-tab.svg
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-310x310.png {
|
||||
root * ./static/mstile-310x310.png
|
||||
handle_path /browserconfig.xml {
|
||||
root * ./static/browserconfig.xml
|
||||
file_server
|
||||
}
|
||||
|
||||
|
|
@ -80,18 +30,68 @@ freedium.cfd {
|
|||
file_server
|
||||
}
|
||||
|
||||
handle_path /favicon-32x32.png {
|
||||
root * ./static/favicon-32x32.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /favicon.ico {
|
||||
root * ./static/favicon.ico
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /humans.txt {
|
||||
root * ./static/humans.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-144x144.png {
|
||||
root * ./static/mstile-144x144.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-150x150.png {
|
||||
root * ./static/mstile-150x150.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-310x150.png {
|
||||
root * ./static/mstile-310x150.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-310x310.png {
|
||||
root * ./static/mstile-310x310.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /mstile-70x70.png {
|
||||
root * ./static/mstile-70x70.png
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /favicon.ico {
|
||||
root * ./static/favicon.ico
|
||||
handle_path /robots.txt {
|
||||
root * ./static/robots.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /safari-pinned-tab.svg {
|
||||
root * ./static/safari-pinned-tab.svg
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /security.txt {
|
||||
root * ./static/security.txt
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /site.webmanifest {
|
||||
root * ./static/site.webmanifest
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_path /sitemap.xml {
|
||||
root * ./static/sitemap.xml
|
||||
file_server
|
||||
}
|
||||
|
||||
|
|
@ -159,6 +159,10 @@ freedium.cfd {
|
|||
respond "Access denied" 403
|
||||
}
|
||||
|
||||
handle_path /cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1 {
|
||||
respond "Access denied" 403
|
||||
}
|
||||
|
||||
route /* {
|
||||
reverse_proxy web:7080
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ static_files = [f for f in listdir("./static") if isfile(join("./static", f))]
|
|||
static_file_template = """
|
||||
handle_path /{{ file }} {
|
||||
root * ./static/{{ file }}
|
||||
file_server
|
||||
file_server
|
||||
}
|
||||
"""
|
||||
static_file_template_jinja = Template(static_file_template)
|
||||
|
|
@ -21,7 +21,7 @@ for file in static_files:
|
|||
OUTPUT_RULES.append(file_template)
|
||||
|
||||
|
||||
ACCESS_DENIED_PATHS = ["websocket", "cdn-cgi/rum", "graphql/websocket", "onboarding/*", "wp-*", ".env", "api*", "apple-touch-icon-precomposed.png", "rss.xml", ".git/*", "apple-touch-icon-120x120.png", "apple-touch-icon-120x120-precomposed.png", "apple-touch-icon-152x152.png", "apple-touch-icon-152x152-precomposed.png", ".well-known/*", "cdn-cgi/challenge-platform/h/b/orchestrate/chl_page/v1"]
|
||||
ACCESS_DENIED_PATHS = ["websocket", "cdn-cgi/rum", "graphql/websocket", "onboarding/*", "wp-*", ".env", "api*", "apple-touch-icon-precomposed.png", "rss.xml", ".git/*", "apple-touch-icon-120x120.png", "apple-touch-icon-120x120-precomposed.png", "apple-touch-icon-152x152.png", "apple-touch-icon-152x152-precomposed.png", ".well-known/*", "cdn-cgi/challenge-platform/h/b/orchestrate/chl_page/v1", "cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1"]
|
||||
|
||||
access_denied_paths_template = """
|
||||
handle_path /{{ file }} {
|
||||
|
|
|
|||
Loading…
Reference in a new issue