Skip to content
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

"Finalizer" middleware #460

Open
pnathan opened this issue Sep 17, 2020 · 0 comments
Open

"Finalizer" middleware #460

pnathan opened this issue Sep 17, 2020 · 0 comments

Comments

@pnathan
Copy link

pnathan commented Sep 17, 2020

I am working through a relatively full featured backend api server, which includes in the middleware stack, among other things, things like:

  • api keys
  • logging

let's walk through the problem:

the api keys middleware will check validity of the api key- if good, it calls next_middleware(), if not good, it calls send(), without calling next_middleware.

But, I also have a logging middleware that should track both the incoming URL and the outgoing status code.
now, as per spect, next_middleware ends the middleware call tree, but, I need this finalizer code (logging) to execute.

thoughts?

@pnathan pnathan changed the title Finalizer" "Finalizer" middleware Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant