mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
uupdate tests
This commit is contained in:
parent
7c93ef1706
commit
b1182cdc3d
@ -9,9 +9,9 @@ import csv
|
||||
# Decorator used to see if authentification works for external dictionary who use a HTTP source.
|
||||
def check_auth(fn):
|
||||
def wrapper(req):
|
||||
auth_header = self.headers.get('Authorization', None)
|
||||
api_key = self.headers.get('api-key', None)
|
||||
if not auth_header or auth_header != 'Zm9vOmJhcg==' or not api_key or api_key != 'secret':
|
||||
auth_header = req.headers.get('authorization', None)
|
||||
api_key = req.headers.get('api-key', None)
|
||||
if not auth_header or auth_header != 'Basic Zm9vOmJhcg==' or not api_key or api_key != 'secret':
|
||||
req.send_response(401)
|
||||
else:
|
||||
fn(req)
|
||||
|
Loading…
Reference in New Issue
Block a user