Caddy is dropping a header

Hi, I have a CentOS server where I have many Golang web applications running, I use Caddy as a proxy server and all the sites are loading correctly. Now, I have a problem with a header, it seems like caddy is dropping the > Referer header and therefore I get some problems in my application.
Exactly, I am not able to call POST,PUT,DELETE ajax calls, only GET is executing correctly. I contacted one of the developers of a library that I am using, and he says that the proxy is dropping that header. I am sending these headers

Should I enable that header in the caddyfile or something? in that case, how is it done?

So your Golang app is seeing the referer proxied correctly for GET requests, but not for AJAX calls with other methods?

You could chuck the following line within the proxy directive block to see if it does anything - but I don’t think there’s any reason it shouldn’t be working out of the box.

header_upstream referer {>referer}

See: proxy docs

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.