1. My Caddy version
2. How I run Caddy:
using command prompt and Caddyfile
a. System environment:
c. My complete Caddyfile:
3. Error messages and/or full log output:
$ caddy.exe run
2020/02/06 06:13:41.836 INFO using adjacent Caddyfile
run: adapting config using : Caddyfile:4: unrecognized directive: header
The header directive was renamed in beta 13. Update to the latest version!
As you said, I updated to latest version and everything is working now
but I want caddy to return custom response header for web-assembly files
and above code is not working
caddy is still returning
Content-Type: application/wasm header
Ah, that’s because inlined path matchers must start with a forward slash so they can be identified as a path matcher token.
Since you’re doing a suffix match in your case, simply create a named matcher:
Also, note the removal of the colon at the end of the field name. It is not necessary, and adding one will create a header filed called
Content-Type: which is not what you want.
Thanks for reply but
still not working
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.