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

Inconsistent execution order between operation hook and custom strong-remoting phase hook #3368

Closed
f-w opened this issue Apr 19, 2017 · 6 comments
Labels

Comments

@f-w
Copy link

f-w commented Apr 19, 2017

With LB3, I am trying to use custom strong-remoting phase to inject httpContext into args.options in order to access HTTP headers in downstream middleware such as operation hooks. I need this injection for all methods, built-in or not, in all of my models and I think this is the least effort approach in terms of minimizing duplications - even better than mix-ins. But it turns out the execution order between operation hooks and strong-remoting phase hooks are inconsistent. To be more specific, I have tried both .addBefore('invoke' and .addAfter('auth' phases. For built-in remote methods they are executed before the operation hook access; for custom instance remote methods executed afterwards.

What is the correct approach in my scenario?

@f-w f-w changed the title Undefined execution order between operation hook and custom strong-remoting phase hook Inconsistent execution order between operation hook and custom strong-remoting phase hook Apr 20, 2017
@bitmage
Copy link
Contributor

bitmage commented Aug 8, 2017

Related to #3434, #3048.

@stale
Copy link

stale bot commented Oct 7, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 7, 2017
@stale
Copy link

stale bot commented Oct 21, 2017

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Oct 21, 2017
@stale
Copy link

stale bot commented Oct 21, 2017

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

2 similar comments
@stale
Copy link

stale bot commented Oct 21, 2017

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale
Copy link

stale bot commented Oct 21, 2017

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants