OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: StandDown on January 24, 2025, 07:31:35 PM

Title: how to add "header_up X-Scheme https" for a domain
Post by: StandDown on January 24, 2025, 07:31:35 PM
Hi All,

I am trying to get a sync to a kobolt reader working with calibre web. I have reverse proxy setup with the caddy plugin and the website is working but the sync for ebooks failes. Apperantly I need to add "header_up X-Scheme https"

Caddy

A working caddy configuration for https, using the domain calibre.mydomain.com:

calibre.mydomain.com {
        reverse_proxy localhost:8083 {
             header_up X-Scheme https
        }
}

How do I do that within Opnsense cadddy plugin?
Title: Re: how to add "header_up X-Scheme https" for a domain
Post by: Monviech (Cedrik) on January 24, 2025, 08:49:13 PM
Heres an example how to create a header and attach it to a handler:

https://docs.opnsense.org/manual/how-tos/caddy.html#reverse-proxy-a-webserver-with-vhosts
Title: Re: how to add "header_up X-Scheme https" for a domain
Post by: StandDown on January 25, 2025, 09:44:20 AM
Thanks, that made me understand how it work little bit more. I have done the following:

(https://i.postimg.cc/bJDV38s2/Screenshot-2025-01-25-at-09-40-09.png)

Is that correct?
Title: Re: how to add "header_up X-Scheme https" for a domain
Post by: Monviech (Cedrik) on January 25, 2025, 09:46:15 AM
Looks fine to me, just compare the result in Diagnostics, you can see the generated Caddyfile there. If the header looks the same after you attached it to the handler, yes.
Title: Re: how to add "header_up X-Scheme https" for a domain
Post by: StandDown on January 25, 2025, 12:00:10 PM
yes, good point, thanks for your help!