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

Priorité d'éxécution des middlewares #51

Closed
Akuket opened this issue Jan 7, 2020 · 3 comments
Closed

Priorité d'éxécution des middlewares #51

Akuket opened this issue Jan 7, 2020 · 3 comments

Comments

@Akuket
Copy link
Contributor

Akuket commented Jan 7, 2020

Bonjour

Il pourrait être intéressant d'avoir la possibilité de définir l'ordre d’exécution des différents middlewares.

@lymeo
Copy link
Owner

lymeo commented Jan 7, 2020

We could define priority in the middleware wrapper like this:

export default async function middlewareWrapper(context) {

  this.priority = 4;

  return async function authenticate(request, response, next) {
    context.logger.debug('Hello world from middleware');
    return next();
  };
}

What do you think?

lymeo pushed a commit that referenced this issue Jan 7, 2020
@lymeo
Copy link
Owner

lymeo commented Jan 7, 2020

Pushed implementation is that ok?

@Akuket
Copy link
Contributor Author

Akuket commented Jan 8, 2020

Great, thanks

@lymeo lymeo closed this as completed Jan 13, 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

2 participants