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

Question: Is it possible to change Referer which PhotoSwipe sends to host when loading images? #2025

Open
sullivan-2 opened this issue Mar 15, 2023 · 1 comment

Comments

@sullivan-2
Copy link

Is it possible by modifying app code to manually set Referrer which PhotoSwipe sends in request headers to host when downloading images?

I don't know JavaScript well, but could try finding solution if you advise the place in PhotoSwipe code where images downloading maintained.

@dimsemenov
Copy link
Owner

You may use contentLoadImage event.

lightbox.on('contentLoadImage', ({ content, isLazy }) => {
  console.log(content.element);
});

If you wanna look how it works internally, the code is at

loadImage(isLazy) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants