Conditionally use middleware

Is it possible to use middleware conditionally? I use Authelia for auth but would like to circumvent it when the service is called within my LAN?

3 Likes

4 years later and this is still apparently not possible :confused:
Have you ever found a way around?

Sure this can be done, use two routers with Host() && ClientIP(), use one with auth middleware.

1 Like

Awesome, thanks!
Will try to see if I need one or two IngressRoutes.

Thank you for the pointer =)