mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +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.
|
# Decorator used to see if authentification works for external dictionary who use a HTTP source.
|
||||||
def check_auth(fn):
|
def check_auth(fn):
|
||||||
def wrapper(req):
|
def wrapper(req):
|
||||||
auth_header = self.headers.get('Authorization', None)
|
auth_header = req.headers.get('authorization', None)
|
||||||
api_key = self.headers.get('api-key', None)
|
api_key = req.headers.get('api-key', None)
|
||||||
if not auth_header or auth_header != 'Zm9vOmJhcg==' or not api_key or api_key != 'secret':
|
if not auth_header or auth_header != 'Basic Zm9vOmJhcg==' or not api_key or api_key != 'secret':
|
||||||
req.send_response(401)
|
req.send_response(401)
|
||||||
else:
|
else:
|
||||||
fn(req)
|
fn(req)
|
||||||
|
Loading…
Reference in New Issue
Block a user