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

requireHeader Pipeline Helper Returning Http 404 #363

Open
scorelocity opened this issue Dec 21, 2022 · 0 comments
Open

requireHeader Pipeline Helper Returning Http 404 #363

scorelocity opened this issue Dec 21, 2022 · 0 comments

Comments

@scorelocity
Copy link

scorelocity commented Dec 21, 2022

I'm using the requireHeader pipeline helper in Program.fs in the following way:

let headerPipe = pipeline {
   plug (requireHeader apiKeyName apiKeyValue) // where apiKeyName and apiKeyValue are retrieved from environment varialbes
}

let app = application {
   pipe_through headerPipe
.
.
.
}

This returns an http 404 Not Found when the correct header is not provided in the request. Is there a way to change this to return http 401 Unauthorized? Is there a better way in Saturn to require a particular api key in a header?

If this is more appropriately asked in Discussions, I'd be happy to move it there.

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

No branches or pull requests

1 participant