1. The problem I’m having:
I am serving a static folder and have a reverse proxy setup. I’m not able to figure out how to set a header_down for this static folder. Need to set a CORS policy
2. Error messages and/or full log output:
Error: adapting config using caddyfile: parsing caddyfile tokens for 'handle': unrecognized directive: header_down - are you sure your Caddyfile structure (nesting and braces) is correct?, at Caddyfile:34
3. Caddy version:
2.8.4
4. How I installed and ran Caddy:
a. System environment:
Ubuntu via apt
b. Command:
sudo /usr/bin/caddy run --watch
d. My complete Caddy config:
example.com {
handle_path /myfolder/* {
reverse_proxy localhost:3000
# header_down Access-Control-Allow-Origin *
header_down {
Access-Control-Allow-Origin *
}
}
handle {
reverse_proxy localhost:8002
}
}