You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to implement the following behavior:
If there's no binding for some path in /a/** invoke some_a_default, if there's no binding for any other path (/**) invoke some_global_default.
I've tried the following:
This works as expected in cases like /non_existent (calling some_global_default) and /a/non_existing (calling some_a_default), but in case of /a/b/non_existent it calls some_global_default, while my intention (due to it being inside the a scope) was for some_a_default to get called.
It is possible somehow for everything inside the a scope to "inherit" the default_service?
If no, what would be the best solution for this? I see only two options, which are not perfect IMHO:
Manually add default_service to every scope inside a scope.
In some_global_default check if request path is starting with /a and handle it differently.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to implement the following behavior:
If there's no binding for some path in
/a/**
invokesome_a_default
, if there's no binding for any other path (/**
) invokesome_global_default
.I've tried the following:
This works as expected in cases like
/non_existent
(callingsome_global_default
) and/a/non_existing
(callingsome_a_default
), but in case of/a/b/non_existent
it callssome_global_default
, while my intention (due to it being inside thea
scope) was forsome_a_default
to get called.It is possible somehow for everything inside the
a
scope to "inherit" the default_service?If no, what would be the best solution for this? I see only two options, which are not perfect IMHO:
a
scope.some_global_default
check if request path is starting with/a
and handle it differently.Beta Was this translation helpful? Give feedback.
All reactions