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
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.
The text was updated successfully, but these errors were encountered:
I'm using the requireHeader pipeline helper in Program.fs in the following way:
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.
The text was updated successfully, but these errors were encountered: