I have a Caddyfile which I have a CORS function defined:
(cors) {
@origin{args.0} header Origin {args.0}
header @origin{args.0} Access-Control-Allow-Origin "{args.0}"
header @origin{args.0} Vary Origin
}
and then currently I have:
import cors {$CORS_ALLOWED_ORIGIN}
However, I really need to iterate over an environment variable which is an array of domains.
Is that possible to loop/iterate in a Caddyfile?