From 2c727c6bd2c748a17981c451a79e558364d12b14 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 30 Dec 2024 11:06:19 +0700 Subject: [PATCH] Use 'allow_methods="*"' in aiohttp_cors.ResourceOptions(). Fixes #2459 --- gns3server/web/web_server.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gns3server/web/web_server.py b/gns3server/web/web_server.py index 3a37ed60..51fad283 100644 --- a/gns3server/web/web_server.py +++ b/gns3server/web/web_server.py @@ -311,7 +311,13 @@ class WebServer: # Background task started with the server self._app.on_startup.append(self._on_startup) - resource_options = aiohttp_cors.ResourceOptions(allow_credentials=True, expose_headers="*", allow_headers="*", max_age=0) + resource_options = aiohttp_cors.ResourceOptions( + allow_credentials=True, + expose_headers="*", + allow_headers="*", + allow_methods="*", + max_age=0 + ) # Allow CORS for this domains cors = aiohttp_cors.setup(self._app, defaults={