Hi All,
Im trying to setup caddy and am hitting a roadblock.
I need to setup some handers for a domain that is freely accessible from the local network, but must pass through an auth provider when being accessed externally.
I have setup the two handlers for the domain, the first one is access list locked, the second has the authenticator pass ticked.
However, when checking the automatically generated config, I can see that an automatic abort handlers has been placed into the first handler instance for my internal network, so the second external handler never receives any traffic.
Is there a way of turning this off? Or is there a workaround that I need to do?
The abort should only be generated in the scope of the handler if you attach an access list to it. Which means, if you have two handlers that match exactly the same path, the first configured one wins always.
What you want to do is not possible in the GUI, you cannot have any complex matching like this. If it should be freely accessable from the local network, configure your auth provider to read the client's IP address from the header (e.g. X-Forwarded-For) and auto log them in if they have RFC1918 addresses or something.
OK,
thanks for the advice!