mirror of
https://github.com/rightup/pyMC_Repeater.git
synced 2026-03-28 17:43:06 +01:00
feat: Add CORS support for OPTIONS requests in filtered_packets endpoint
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user