Skip to content

Instantly share code, notes, and snippets.

View hashlash's full-sized avatar

hashlash

View GitHub Profile
@hashlash
hashlash / Caddyfile
Last active June 15, 2021 03:11 — forked from ryanburnette/Caddyfile
Caddy v2.1 CORS whitelist
(cors) {
@origin{args.0} header Origin {args.0}
header @origin{args.0} Access-Control-Allow-Origin "{args.0}"
}
(cors_regexp) {
@origin_regexp{args.0} header_regexp Origin {args.0}
header @origin_regexp{args.0} Access-Control-Allow-Origin "{header.Origin}"
}