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:
parent
084017a673
commit
a4a3ce8a2e
@ -180,7 +180,8 @@ export class Cache {
|
||||
};
|
||||
|
||||
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) {
|
||||
xhr.responseType = responseType;
|
||||
|
Loading…
Reference in New Issue
Block a user