1. The problem I’m having:
Hi,
I’m a begginer with Caddy, I’ve only used the base features for now. I am searching to achieve the following:
I have an app that is reverse proxied by caddy with https (Home Assistant). I want to add other apps, that would be integrated into HA. They would be iframes inside HA UI. The problem I have is that when HA is accessed through https, all the apps in the iframes also need to be accessed through https. I can perfectly reverse proxy them too and then the iframes works, but the problem with doing that is that they will be accessible worldwide without any security. I can in that case use forward_auth with tools like Authelia, but tools like this make it incompatible with the iframes. So I have 2 directions I can search:
- Trying to make forward_auth inactive when accessed from HA through an iframe but still active when accessed directly
- Trying to make the services accessible through https locally but make them completely unavailable remotely
I don’t know how to do any of these.
I think the solution 2 is easier but I’m not quite sure, if you have ideas for both I’m all ears. Thanks in advance for any answer, have a great day
2. Error messages and/or full log output:
No errors
3. Caddy version:
2.6.4
4. How I installed and ran Caddy:
Caddy Docker Proxy
a. System environment:
b. Command:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
c. Service/unit/compose file:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
d. My complete Caddy config:
Here is an example of one of my services that I’m reverse proxying:
zigbee2mqtt.redacted.fr {
forward_auth authelia:9091 {
copy_headers Remote-User Remote-Groups Remote-Name Remote-Email
uri /api/verify?rd=https://authelia.redacted.fr/
}
reverse_proxy zigbee2mqtt:80
}