diff --git a/lib/galaxy/webapps/base/api.py b/lib/galaxy/webapps/base/api.py index a0faf2b11371..2c8cc4b8b11c 100644 --- a/lib/galaxy/webapps/base/api.py +++ b/lib/galaxy/webapps/base/api.py @@ -264,7 +264,7 @@ def include_all_package_routers(app: FastAPI, package_name: str): # handle CORS preflight requests - synchronize with wsgi behavior. # this needs to happen last so it doesn't clobber routes with explicit cors handling # it doesn't affect the CORS middleware since the middleware terminates the request handling before routing - @app.options("/api/{rest_of_path:path}") + @app.options("/api/{rest_of_path:path}", include_in_schema=False) async def preflight_handler(request: Request, rest_of_path: str) -> Response: response = Response() response.headers["Access-Control-Allow-Headers"] = "*"