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

Getting a 403 for image URLs. #192

Open
charlesmonroeofficial opened this issue Aug 28, 2018 · 7 comments
Open

Getting a 403 for image URLs. #192

charlesmonroeofficial opened this issue Aug 28, 2018 · 7 comments

Comments

@charlesmonroeofficial
Copy link

charlesmonroeofficial commented Aug 28, 2018

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[x] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->

Current behavior

When previewing some html which contains img elements with a src pointing to imgur for example I get a 403 status code (Forbidden). I would like to be able to configure the server permissions.

@rjoydip-zz
Copy link
Collaborator

Can you reproduce some code?

@charlesmonroeofficial
Copy link
Author

Simplified code:
<body><img src='https://i.imgur.com/eofgcoR.png'/></body>

I go live and I get this:
image

@morfinismo
Copy link

Samething here! Did you resolved your problem @charlesmonroeofficial ?

@navjotjsingh
Copy link

I am getting the same error. Does anyone know how to fix this? I have checked the firewall rules, but they seem to be fine.

@synalice
Copy link

Solution

This issue doesn't seem to appear when opening the page as localhost instead of 127.0.0.1.

For example, if I start a live server and go to 127.0.0.1:5500, images that are hosted at imgur, don't load.
But if instead I go to localhost:5500 everything works fine.

This fixed my issue, but I don't guarantee it to work for everyone.

@morfinismo
Copy link

morfinismo commented Aug 16, 2021

The solution that has worked for me is adding the "referrer" attribute like this:

<img referrerpolicy="noreferrer" src='https://i.imgur.com/eofgcoR.png'/>

@choidavid4
Copy link

Solution

This issue doesn't seem to appear when opening the page as localhost instead of 127.0.0.1.

For example, if I start a live server and go to 127.0.0.1:5500, images that are hosted at imgur, don't load.
But if instead I go to localhost:5500 everything works fine.

This fixed my issue, but I don't guarantee it to work for everyone.

Worked like a charm! Thank you!

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

6 participants