File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -91,15 +91,8 @@ async def verify_parameter_names(parameter_names: list) -> None:
9191
9292
9393def create_url_from_request (request ):
94- # The server root_path contains the path added by a reverse proxy
95- base_path = request .scope .get ("root_path" )
96-
97- # The host will (should) be correctly set from X-Forwarded-Host and X-Forwarded-Scheme
98- # headers by any proxy in front of it
99- host = request .headers ["host" ]
100- scheme = request .url .scheme
101-
102- return f"{ scheme } ://{ host } { base_path } /collections"
94+ # IMPORTANT: We rely on proxy to block attempts to modify the URL (e.g. blocking "Host" header)
95+ return f"{ request .base_url } collections"
10396
10497
10598def split_and_strip (cs_string : str ) -> list [str ]:
You can’t perform that action at this time.
0 commit comments