Caddy proxy plugin headers setup

Started by openasapce, May 01, 2024, 01:51:16 PM

Previous topic - Next topic
May 01, 2024, 01:51:16 PM Last Edit: May 01, 2024, 01:57:44 PM by openasapce
Hello, anyone know how to set this options in the caddy proxy plugin inside opnsense like this nginx rules?:

proxy_set_header X-Real-IP $remote_addr; 
proxy_set_header X-Forwarded-For $remote_addr; 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
client_max_body_size 0; 
proxy_buffering off; 
proxy_request_buffering off; 
add_header X-Frame-Options SAMEORIGIN; 
autoindex off;


Look attached image, i'm sure that is uncorrect ;D :o

Caddy sets most headers automatically without having to configure them. Here are the defaults:

https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#defaults

Best not to mess around with them, if things work without having to modify them

Hardware:
DEC740