Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Images inside iframe require authorization

I'm working on a page with a few iframes. The sites displayed inside the iframes are all secured with http auth, so i've set the iframe src like this

<iframe src="http://username:[email protected]"></iframe>

the problem: The sites load, but not the images. For each image i get a 401 (authorization required) in the console.

Am i missing something?

EDIT: it seems to be a "Chrome-only" problem

like image 207
jan reimers Avatar asked Feb 25 '26 05:02

jan reimers


1 Answers

By any chance is this occurring with Chrome only?

*Edit:

If you add this to the end of the browser .exe: --allow-cross-origin-auth-prompt

As in: C:\Users\HelloItsMe\AppData\Local\Google\Chrome\Application\chrome.exe --allow-cross-origin-auth-prompt

It should allow the images to load. I suspect this is a bug with Chrome though.

like image 92
Neph Avatar answered Feb 26 '26 19:02

Neph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!