As far as I understood Mojolicious routing the "under" method provides a code sharing method for routes, whereas "over" adds conditions to these routes. In my application I use the "under" method on all routes under "/" to perform authentication and authorization (saved inside the session), and "over" conditions to check if a user has a certain permission.
Unfortunately Mojolicious checks the condition from "over" first, before executing the shared code from "under" which leads to unauthorized requests every time a user makes an API call where the client does not save the session. Is there any way to achieve what I want, or is this just not the way Mojolicious works with the "over" and "under" routing precedence?
Thank you!