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

UseGiraffeErrorHandler chaining support #118

Merged
merged 1 commit into from
Oct 29, 2017

Conversation

draganjovanovic1
Copy link
Contributor

UseGiraffeErrorHandler ApplicationBuilder extension modified (ignore removed) to support chaining since it should probably never be the last middleware in the pipeline.

app.UseCors(configureCors)
    .UseGiraffeErrorHandler(errorHandler)
    .UseAuthentication()
    .UseGiraffe webApp

vs

app.UseCors configureCors |> ignore
app.UseGiraffeErrorHandler errorHandler
app.UseAuthentication() |> ignore
app.UseGiraffe webApp

@dustinmoris
Copy link
Member

Nice, yes that makes sense. I wasn't thinking about chaining when I wrote the middleware, but I think your PR makes a lot more sense and is more incline with ASP.NET Core 👍

@dustinmoris dustinmoris changed the base branch from master to develop October 29, 2017 14:26
@dustinmoris dustinmoris merged commit 87d34ba into giraffe-fsharp:develop Oct 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants