flask-basicauth icon indicating copy to clipboard operation
flask-basicauth copied to clipboard

Excluding certain routes when BASIC_AUTH_FORCE = True

Open domkck opened this issue 8 years ago • 4 comments

Hi, would you be interested in a patch that adds support for excluding certain routes when BASIC_AUTH_FORCE = True? I want to protect all endpoints with the exception of for example /healthcheck.

domkck avatar Oct 30 '16 17:10 domkck

Related: exclude certain methods, like OPTIONS, which is required for CORS, but which can't contain Authorization header.

panuhorsmalahti avatar Dec 18 '17 13:12 panuhorsmalahti

This might help: https://github.com/jpvanhal/flask-basicauth/pull/14 .

megahall avatar Apr 19 '18 21:04 megahall

#14 resolves the CORS issue, but not the /healthcheck issue.

@domkck did you end up writing that patch?

I assume we just need something like @basic_auth.required, but the opposite.

mdavis-xyz avatar Nov 30 '20 00:11 mdavis-xyz

@jpvanhal this repo hasn't been updated in a while. Can you confirm that if I write a PR for this that you'll accept it?

mdavis-xyz avatar Dec 04 '20 04:12 mdavis-xyz