-
-
Save nimezhu/42c6549d7d8206d0445c3e86d1d5a497 to your computer and use it in GitHub Desktop.
Caddy v2.1 CORS whitelist
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
(cors) { | |
@origin{args.0} header Origin {args.0} | |
header @origin{args.0} Access-Control-Allow-Origin "{args.0}" | |
} | |
myawesomewebsite.com { | |
root * /srv/public/ | |
file_server | |
header Access-Control-Allow-Methods "POST, GET, OPTIONS" | |
header Access-Control-Allow-Headers "*" | |
import cors https://member.myawesomewebsite.com | |
import cors https://customer.myawesomewebsite.com | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment