add option to disable TLS certificate validation in http_client
This commit is contained in:
@@ -21,7 +21,7 @@ async def uptime():
|
||||
async def version():
|
||||
return jsonify({"version": globals.version})
|
||||
|
||||
@server.route("/_hammerhead/admin/reload-config")
|
||||
@hammerhead.route("/_hammerhead/admin/reload-config")
|
||||
async def reload_config():
|
||||
return jsonify({})
|
||||
|
||||
|
||||
@@ -304,6 +304,7 @@ class http_client:
|
||||
headers: dict = {},
|
||||
authorize: bool = True,
|
||||
json: dict = {},
|
||||
verify: bool = True,
|
||||
):
|
||||
resolved = self._resolve(destination)
|
||||
|
||||
@@ -321,7 +322,8 @@ class http_client:
|
||||
f"{resolved.base_url}{path}",
|
||||
headers=headers,
|
||||
extensions={"sni_hostname": resolved.sni},
|
||||
json=json
|
||||
json=json,
|
||||
verify=verify,
|
||||
)
|
||||
|
||||
def get(
|
||||
@@ -330,6 +332,7 @@ class http_client:
|
||||
destination: str,
|
||||
headers: dict = {},
|
||||
authorize: bool = True,
|
||||
verify: bool = True,
|
||||
):
|
||||
resolved = self._resolve(destination)
|
||||
|
||||
@@ -345,7 +348,8 @@ class http_client:
|
||||
return self.http.get(
|
||||
f"{resolved.base_url}{path}",
|
||||
headers=headers,
|
||||
extensions={"sni_hostname": resolved.sni}
|
||||
extensions={"sni_hostname": resolved.sni},
|
||||
verify=verify,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user