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

Cookies not passed to image request #464

Open
HassanRaza1112 opened this issue Oct 2, 2023 · 0 comments
Open

Cookies not passed to image request #464

HassanRaza1112 opened this issue Oct 2, 2023 · 0 comments

Comments

@HassanRaza1112
Copy link

I am using secure image in <img src="https://mydomain.com/secure/images/> dom-to-image.toJpeg()

These images can only be fetched if image request have my cookies from browser local storage.
dom-tom-image during conversion when request those image doesn't send browser cookies.

	const dataUrl = await domtoimage.toJpeg(imageRef.current, {
					quality: 0.95,
					cacheBust: true
				});
				let link = document.createElement('a');
				link.download = `screenshot.jpeg`;
				link.href = dataUrl;
				link.click();

Expected behavior: Send browser cookies along with the img request inside dom-to-image.
Actual behavior : Gives 403 forbidden even cookies are saved with same domain name.
Library version: 2.6.0

negative-cookies1

positive-cookies1

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

No branches or pull requests

1 participant