mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
feat(google_cs): Pass API key in header to prevent request logging from printing secret
This commit is contained in:
parent
7db1b382b8
commit
99cc43b9b7
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,6 @@ def request(query, params):
|
|||
return params
|
||||
|
||||
query = {
|
||||
'key': api_key,
|
||||
'cx': cx,
|
||||
'q': query,
|
||||
'safe': 'active' if params['safesearch'] > 0 else 'off',
|
||||
|
@ -188,6 +187,7 @@ def request(query, params):
|
|||
query['lr'] = lang_info['params']['lr']
|
||||
|
||||
params['url'] = base_url.format(query=urlencode(query))
|
||||
params['headers']['X-Goog-Api-Key'] = api_key
|
||||
params['raise_for_httperror'] = False
|
||||
return params
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue