Skip to content

Commit

Permalink
Refactor query params handling in extractor route with API Password
Browse files Browse the repository at this point in the history
  • Loading branch information
mhdzumair committed Nov 17, 2024
1 parent 76e7aec commit 1fce641
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mediaflow_proxy/routes/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ async def extract_url(
response["mediaflow_proxy_url"] = str(
request.url_for(response.pop("mediaflow_endpoint")).replace(scheme=get_original_scheme(request))
)
response["query_params"] = response.get("query_params", {})
# Add API password to query params
response["query_params"]["api_password"] = request.query_params.get("api_password")

if extractor_params.redirect_stream:
response["query_params"] = response.get("query_params", {})
# Add API password to query params
response["query_params"]["api_password"] = request.query_params.get("api_password")
stream_url = encode_mediaflow_proxy_url(
**response,
response_headers=proxy_headers.response,
Expand Down

0 comments on commit 1fce641

Please sign in to comment.