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

feature: Return error response on auth failure with redirect disabled #25

Open
alirf81 opened this issue Sep 7, 2022 · 0 comments
Open

Comments

@alirf81
Copy link

alirf81 commented Sep 7, 2022

Hi @greenpau
While using caddy-security, I found this error.
greenpau/caddy-security#157 (comment)
So I disabled redirect in caddy security and when I put no token, it returned 500 Internal Server Error.
As I checked, this is because of go-authcrunch package.
https://github.com/greenpau/go-authcrunch/blob/main/pkg/authz/authenticate.go#L123
Here, if there is an error and redirect is disabled, it sets nothing in response writer.
As a result, Caddy caused the internal server error.
Can you please make it set some error response if redirect disabled? and release new tag of go-authcrunch and caddy-security?
It will be very helpful to me!
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants