Skip to content

Commit

Permalink
Use 'allow_methods="*"' in aiohttp_cors.ResourceOptions(). Fixes #2459
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Dec 30, 2024
1 parent 13b0cae commit 2c727c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gns3server/web/web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,13 @@ def wakeup():
# 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={
Expand Down

0 comments on commit 2c727c6

Please sign in to comment.