Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow proxy url with parameters #2100

Merged
merged 3 commits into from
Jul 12, 2021
Merged

Allow proxy url with parameters #2100

merged 3 commits into from
Jul 12, 2021

Conversation

mzand33
Copy link
Contributor

@mzand33 mzand33 commented Dec 27, 2019

Summary
Currently, proxy url's cannot have parameters.

This PR fixes/implements the following bugs/features
2098

Explain the motivation for making this change. What existing problem does the pull request solve?

If a proxy url contains a parameter such as:
http://abc.com/myproxy.jsp?myparam=foo
html2canvas will call the proxy using the following url:
http://abc.com/myproxy.jsp?myparam=foo?url=abc.com....
Notice there are two question marks in the url which is incorrect. The second parameter should begin with an ampersand.
The code had automatically put a question mark (?) after the proxy url. I fixed the code to check whether there is already a parameter at the end of the url. This was properly done in the the 0.5 version:

Test plan (required)
Pass a proxy url which ends with a parameter(s) as an option.

Code formatting

Please make sure that code adheres to the project code formatting. Running npm run format will automatically format your code correctly.

Closing issues

Fixes #2098
Closes #2098

Handle proxy urls that have parameters
fix formatting
Fix variable name
@Akshay-Bindal
Copy link

What is the status of this PL? Can we please expedite this as it seems like a common use case where proxy url can have existing query params.

@niklasvh niklasvh merged commit a4a3ce8 into niklasvh:master Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proxy url cannot have parameters
3 participants