Created
June 11, 2025 08:37
-
-
Save skeptrunedev/e2ab54688d1b2d41d448aa62354f4618 to your computer and use it in GitHub Desktop.
Caddy Cors Allow Anything Setup
This file contains hidden or 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
# Global options | |
{ | |
email [email protected] | |
debug | |
} | |
(cors) { | |
@cors_preflight method OPTIONS | |
handle @cors_preflight { | |
header Access-Control-Allow-Origin "*" | |
header Access-Control-Allow-Methods "*" | |
header Access-Control-Allow-Headers "*" | |
header Access-Control-Allow-Credentials "true" | |
header Access-Control-Max-Age "86400" | |
respond "" 204 | |
} | |
header Access-Control-Allow-Origin "*" | |
header Access-Control-Allow-Credentials "true" | |
header Access-Control-Expose-Headers "*" | |
} | |
listmonk.skeptrune.com { | |
import cors | |
reverse_proxy localhost:9000 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use this config on any domain you are hosing via caddy to make sure that all cors requests to it succeed