We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eeaed05 commit 001890cCopy full SHA for 001890c
scrapyd_k8s/api.py
@@ -133,7 +133,13 @@ def error(msg, status=200):
133
return { 'status': 'error', 'message': msg }, status
134
135
def enable_authentication(app, config_username, config_password):
136
- basic_auth = BasicAuth(app)
+
137
+ # workaround for https://github.com/jpvanhal/flask-basicauth/issues/11
138
+ class BasicAuthExceptHealthz(BasicAuth):
139
+ def authenticate(self):
140
+ return request.path == "/healthz" or super().authenticate()
141
142
+ basic_auth = BasicAuthExceptHealthz(app)
143
app.config["BASIC_AUTH_USERNAME"] = config_username
144
app.config["BASIC_AUTH_PASSWORD"] = config_password
145
app.config["BASIC_AUTH_FORCE"] = True
0 commit comments