OPNsense Forum

Archive => 24.1, 24.4 Legacy Series => Topic started by: openasapce on May 01, 2024, 01:51:16 PM

Title: Caddy proxy plugin headers setup
Post by: openasapce on May 01, 2024, 01:51:16 PM
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
Title: Re: Caddy proxy plugin headers setup
Post by: Monviech (Cedrik) on May 01, 2024, 04:41:39 PM
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