You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Translate plugins configuration to routing objects, when the backwards compatibility mode (PR #458) is activated.
Background
PR #458 added a "backwards compatibility mode" for origins-file based application routing. In the backwards compatibility mode Styx configures its forwarding path according to origins.yaml but at the moment it doesn't support external plugins.
To conclude the backwards compatibility mode work, Styx must apply the plugins configuration (in styx server configuration) to the forwarding path.
Detailed Description
The plugins are loaded from the styx server configuration, and they will be available in StyxServerComponents class. But they are not automatically applied to the forwarding path when object based routing is used. Styx wouldn't know where to apply them. The plugins would have to be inserted at a desirable point in the forwarding path using the InterceptorPipeline object.
In the backwards compatibility mode the plugins should be applied at the beginning of the HTTP pipeline. We should create an InterceptorPipeline object, configure this with the plugins, and insert the object in HTTP pipeline root, just before the PathPrefixRouter object. The forwarding path will thus look like this:
Description
Translate plugins configuration to routing objects, when the backwards compatibility mode (PR #458) is activated.
Background
PR #458 added a "backwards compatibility mode" for origins-file based application routing. In the backwards compatibility mode Styx configures its forwarding path according to
origins.yaml
but at the moment it doesn't support external plugins.To conclude the backwards compatibility mode work, Styx must apply the plugins configuration (in styx server configuration) to the forwarding path.
Detailed Description
The plugins are loaded from the styx server configuration, and they will be available in
StyxServerComponents
class. But they are not automatically applied to the forwarding path when object based routing is used. Styx wouldn't know where to apply them. The plugins would have to be inserted at a desirable point in the forwarding path using theInterceptorPipeline
object.In the backwards compatibility mode the plugins should be applied at the beginning of the HTTP pipeline. We should create an
InterceptorPipeline
object, configure this with the plugins, and insert the object in HTTP pipeline root, just before thePathPrefixRouter
object. The forwarding path will thus look like this:Acceptance Criteria
HttpPipelineHandler
is created for the plugins, and inserted ashttpPipeline
root object.HttpPipelineHandler
pipeline contains the plugins in the order described byplugins.all
attribute.HttpPipelineHandler
handler attribute points to thePathPrefixRouter
object.HttpPipelineHandler
shall be calledpluginPipeline
. An end-user needs to use this name to route traffic to it. Like so:httpPipeline: pluginPipeline
The text was updated successfully, but these errors were encountered: