diff --git a/python/src/uagents/asgi.py b/python/src/uagents/asgi.py index 1a74e468..4cdfda51 100644 --- a/python/src/uagents/asgi.py +++ b/python/src/uagents/asgi.py @@ -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) @@ -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.