feat: Add CORS support for OPTIONS requests in filtered_packets endpoint

This commit is contained in:
Lloyd
2026-01-02 10:40:32 +00:00
parent c45fb6ba55
commit 2ba7be974d

View File

@@ -736,6 +736,11 @@ class APIEndpoints:
@cherrypy.expose
@cherrypy.tools.json_out()
def filtered_packets(self):
# Handle OPTIONS request for CORS preflight
if cherrypy.request.method == "OPTIONS":
self._set_cors_headers()
return ""
try:
params = self._get_params({
'type': None,