0

I'm trying to fetch a live stream from my IP-camera and display it in a image tag in my Vuejs project:

<img src="http://10.0.0.110/video1.mjpg">

(nothing special here)

http://10.0.0.110/video1.mjpg is a protected resource and not accessible for unauthorized users. If I put http://10.0.0.110/video1.mjpg in my browser's address field, I will correctly be asked for credentials (just as it should be).

Problem:

My problem is that I am not asked for any credentials when I'm browsing my html containing this: <img src="http://10.0.0.110/video1.mjpg">. I'm left with an adequate error message in my browser's inspector: my browser's inspector

Question:

Is it possible to force the browswer to ask for credentials? How?

Hauns TM
  • 1,909
  • 2
  • 22
  • 38

1 Answers1

1

It seems like this is a duplicate of How to set the <img> tag with basic authentication

The accepted answer may indicate that this is not possible. I was able to reproduce your issue. I tried a little bit myself and ended up using an iframe. Try something like <iframe src="http://10.0.0.110/video1.mjpg"></iframe> and set an appropriate size. It worked for me in Chrome.

Oliver
  • 66
  • 1
  • 3