Skip to content

Commit

Permalink
Add HTTPS Netbox endpoints on CORS list
Browse files Browse the repository at this point in the history
  • Loading branch information
emersonfelipesp committed Nov 25, 2024
1 parent 33fcd02 commit 836b153
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
15 changes: 8 additions & 7 deletions netbox_proxbox/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@
netbox_endpoint_port80 = f"http://{netbox_host}:80"
netbox_endpoint_port8000 = f"http://{netbox_host}:8000"
netbox_endpoint = f"http://{netbox_host}:{netbox_port}"
https_netbox_endpoint = f"https://{netbox_host}:{netbox_port}"
https_netbox_endpoint = f"https://{netbox_host}"
https_netbox_endpoint443 = f"https://{netbox_host}:443"
https_netbox_endpoint_port = f"https://{netbox_host}:{netbox_port}"


PROXBOX_PLUGIN_NAME: str = "netbox_proxbox"
Expand All @@ -122,17 +124,16 @@

origins = [
fastapi_endpoint,
fastapi_endpoint_port8000,
fastapi_endpoint_port80,
https_fastapi_endpoint,
netbox_endpoint,
https_netbox_endpoint,
netbox_endpoint_port80,
netbox_endpoint_port8000,
fastapi_endpoint_port8000,
fastapi_endpoint_port80,
https_netbox_endpoint,
https_netbox_endpoint443,
https_netbox_endpoint_port,
"http://localhost",
"https://10.0.30.168",
"https://10.0.30.168:443"
"https://10.0.30.168:80"
]

app.add_middleware(
Expand Down
25 changes: 25 additions & 0 deletions ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
● netbox.service - NetBox WSGI Service
Loaded: loaded (]8;;file://nmultifibra/etc/systemd/system/netbox.service/etc/systemd/system/netbox.service]8;;; enabled; preset: enabled)
Active: active (running) since Mon 2024-11-25 14:12:07 UTC; 5s ago
Docs: ]8;;https://docs.netbox.dev/https://docs.netbox.dev/]8;;
Main PID: 2987763 (gunicorn)
Tasks: 6 (limit: 9444)
Memory: 545.7M (peak: 546.5M)
CPU: 8.906s
CGroup: /system.slice/netbox.service
├─2987763 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi
├─2987765 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi
├─2987766 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi
├─2987767 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi
├─2987768 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi
└─2987769 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi

Nov 25 14:12:07 nmultifibra systemd[1]: Started netbox.service - NetBox WSGI Service.
Nov 25 14:12:07 nmultifibra gunicorn[2987763]: [2024-11-25 14:12:07 +0000] [2987763] [INFO] Starting gunicorn 23.0.0
Nov 25 14:12:07 nmultifibra gunicorn[2987763]: [2024-11-25 14:12:07 +0000] [2987763] [INFO] Listening at: http://0.0.0.0:8001 (2987763)
Nov 25 14:12:07 nmultifibra gunicorn[2987763]: [2024-11-25 14:12:07 +0000] [2987763] [INFO] Using worker: gthread
Nov 25 14:12:07 nmultifibra gunicorn[2987765]: [2024-11-25 14:12:07 +0000] [2987765] [INFO] Booting worker with pid: 2987765
Nov 25 14:12:07 nmultifibra gunicorn[2987766]: [2024-11-25 14:12:07 +0000] [2987766] [INFO] Booting worker with pid: 2987766
Nov 25 14:12:07 nmultifibra gunicorn[2987767]: [2024-11-25 14:12:07 +0000] [2987767] [INFO] Booting worker with pid: 2987767
Nov 25 14:12:07 nmultifibra gunicorn[2987768]: [2024-11-25 14:12:07 +0000] [2987768] [INFO] Booting worker with pid: 2987768
Nov 25 14:12:07 nmultifibra gunicorn[2987769]: [2024-11-25 14:12:07 +0000] [2987769] [INFO] Booting worker with pid: 2987769

0 comments on commit 836b153

Please sign in to comment.