mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
fix: allow proxy url with parameters (#2100)
This commit is contained in:
@@ -180,7 +180,8 @@ export class Cache {
|
|||||||
};
|
};
|
||||||
|
|
||||||
xhr.onerror = reject;
|
xhr.onerror = reject;
|
||||||
xhr.open('GET', `${proxy}?url=${encodeURIComponent(src)}&responseType=${responseType}`);
|
const queryString = proxy.indexOf('?') > -1 ? '&' : '?';
|
||||||
|
xhr.open('GET', `${proxy}${queryString}url=${encodeURIComponent(src)}&responseType=${responseType}`);
|
||||||
|
|
||||||
if (responseType !== 'text' && xhr instanceof XMLHttpRequest) {
|
if (responseType !== 'text' && xhr instanceof XMLHttpRequest) {
|
||||||
xhr.responseType = responseType;
|
xhr.responseType = responseType;
|
||||||
|
|||||||
Reference in New Issue
Block a user