Skip to content

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

Closed

Description

@f-w

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?

Activity

  1. 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[/+] on Apr 20, 2017
  2. bitmage commented on Aug 8, 2017

    @bitmage
    Contributor

    Related to #3434, #3048.

  3. stale commented on Oct 7, 2017

    @stale

    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.

  4. stale commented on Oct 21, 2017

    @stale

    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.

  5. stale commented on Oct 21, 2017

    @stale

    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.

  6. stale commented on Oct 21, 2017

    @stale

    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.

  7. stale commented on Oct 21, 2017

    @stale

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions