There is a problem when using the halacious plugin on a server configured with multiple connections.
-
internals.route call to server.lookup() fails because it is not allowed on multiple connections. I'm not sure of other use cases but for me, my public API is specified with the apiServerLabel option (which are the links I want to present, no matter which connection I receive a request on) so I have changed the call to selection.lookup().
-
I'm not sure of the reason for selection.ext('onPostHandler', internals.postHandler); using selection and not server. The plugin server.register() call already has an option to select which connections the plugin should apply to so using selection here seems like an error or redundancy at best. I have changed it to server.ext('onPostHandler', internals.postHandler); which allows me to use halacious on multiple connections but lookup routes on the canonical apiServerLabel connection.
These changes are in https://github.com/Clarify/halacious/tree/use-apiServerLabel-for-route-lookup
If it seems useful, I can make a PR.