Services not loading while restricting Keycloak admin dasboard to specific IP's

I have just created a traefik ingress route for whitelisting IP's for Keycloak admin dashboard. Everything works fine for whitelisted IP's but for other IP's it also blocking backend services and also frontend is not loading gives error in console e.g. unauthoized token, token not found etc, etc. Use case scenario is

https://abc.com/def/ghi/ - (frontend)
https://abc.com/def/jkl/ - (user services)
https://abc.com/def - (Keycloak admin dashboard)

I want to restrict abc.com/def and allow other URL's to everyone including services. Backend services running on Java (quarkus, Maven etc).

Any help would be greatly appreciated.

Split your route in two using && PathPrefix(`/def/`), one with and one without keycloak, if keyvloak does not support this internally.

Thanks for the input. I was just restricting /def. Create another middleware with /def/ it worked.