mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
Merge pull request #2682 from yueguobin/fix/packet-capture-https-skip-cert
fix(copilot): add verify=False for HTTPS with self-signed certs
This commit is contained in:
commit
9d0bb4a592
@ -185,11 +185,14 @@ class PacketCaptureTool(BaseTool):
|
||||
import requests
|
||||
|
||||
headers = {"Authorization": f"Bearer {jwt_token}"}
|
||||
# Use verify=False for HTTPS to skip certificate validation (for self-signed certs)
|
||||
verify_cert = not capture_url.startswith("https://")
|
||||
response = requests.get(
|
||||
capture_url,
|
||||
headers=headers,
|
||||
stream=True,
|
||||
timeout=30,
|
||||
verify=verify_cert,
|
||||
)
|
||||
|
||||
if response.status_code != 200:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user