Skip to content

Commit

Permalink
loosen access control rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Archento committed Aug 23, 2024
1 parent 05f08e8 commit 0e3c4d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/src/uagents/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,13 @@ async def serve(self):
host=HOST,
port=self._port,
log_level="warning",
forwarded_allow_ips="*",
headers=[
("Access-Control-Allow-Origin", "*"),
("Access-Control-Request-Method", "*"),
("Access-Control-Allow-Methods", "OPTIONS, GET, POST"),
("Access-Control-Allow-Methods", "*"),
("Access-Control-Allow-Headers", "*"),
("Access-Control-Allow-Credentials", "true"),
],
)
self._server = uvicorn.Server(config)
Expand All @@ -290,7 +292,7 @@ async def serve(self):
except KeyboardInterrupt:
self._logger.info("Shutting down server")

async def __call__(self, scope, receive, send): # pylint: disable=too-many-branches
async def __call__(self, scope, receive, send):
"""
Handle an incoming ASGI message, dispatching the envelope to the appropriate handler,
and waiting for any queries to be resolved.
Expand Down

0 comments on commit 0e3c4d1

Please sign in to comment.