mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
fix(copilot): add verify=False for HTTPS with self-signed certs
Add verify=False to requests.get() when capture_url uses HTTPS protocol, to skip SSL certificate validation. This allows PacketCaptureTool to work with GNS3 servers using self-signed certificates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f06b5fff21
commit
d6d4f7262e
@ -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