OPTIONS route ignores Before/After pipelines #1422
Comments
Since the This results in the The solution would be to somehow get the pipelines into the |
I only came so far:
Resolve does not run any callbacks before passing the request to Can you help? Thank you very much! |
I'll take a look at it 😉 |
So this is within a [Fact]
public void Should_invoke_AfterRequest_pipeline()
{
var afterPipelineInvoked = false;
var bootstrapper = new ConfigurableBootstrapper();
bootstrapper.AfterRequest
.AddItemToEndOfPipeline(ctx => afterPipelineInvoked = true);
new Browser(bootstrapper).Options("/");
Assert.True(afterPipelineInvoked);
} Try adding the |
You are totally right, it works when I do this the bootstrapper:
Thanks again! 👍 |
Glad you figured it out! 👯 |
I am having this same issue and the ApplicationStartup did not help me |
I use Nancy together with backbone. When I save a model to the server, backbone sends a OPTIONS request to check if the server accepts PUT requests (see this SO answer). Nancy answers these automatically, but it does not run the after pipeline of my module, which looks like this:
Because the
Access-Control-Allow-Origin
is not set, the request fails:Request headers:
Response headers:
The text was updated successfully, but these errors were encountered: