-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app.before_request & app.after_request do not run in sub app #478
Comments
@iaudouard is the decorator added to the subapp and it is not triggering on requests, or is the decorator on the main app and requests to the subapp are not triggering it? |
@anovis The decorator is added to the subapp and isn't triggering on requests. I'm guessing this is the expected behavior? |
Hmm I haven't run into that use case before. I will look into it. On the one hand I don't want that decorator to trigger on all other subapps, but not sure if there is an easy way to trigger just on that specific subapp. In the meantime you can try just adding it to the main app, while I look into the subapp specific case. |
looks like we dont combine alerts or infra or middleware for subapps. https://github.com/goblet/goblet/blob/main/goblet/resource_manager.py#L193 so this is certainly a bug. i will also make sure that middleware is added to a subapp it is only applied for that sub-app. it should be possible since we track all subapps via self.app_list |
Currently, the
before_request
&after_request
decorators do not run when attached to a sub app, would it be possible to support this?The text was updated successfully, but these errors were encountered: