1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

Allow cors from Github pages demo site

This commit is contained in:
Julien Duponchelle 2016-05-17 17:51:22 +02:00
parent b07dcf552c
commit c4ebdc0e37
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -211,7 +211,8 @@ class WebServer:
# Allow CORS for this domains # Allow CORS for this domains
cors = aiohttp_cors.setup(app, defaults={ cors = aiohttp_cors.setup(app, defaults={
# Default web server for web gui dev # Default web server for web gui dev
"http://localhost:8080": aiohttp_cors.ResourceOptions(expose_headers="*", allow_headers="*") "http://localhost:8080": aiohttp_cors.ResourceOptions(expose_headers="*", allow_headers="*"),
"http://gns3.github.io": aiohttp_cors.ResourceOptions(expose_headers="*", allow_headers="*")
}) })
for method, route, handler in Route.get_routes(): for method, route, handler in Route.get_routes():
log.debug("Adding route: {} {}".format(method, route)) log.debug("Adding route: {} {}".format(method, route))