Only safe origin is allowed (see https://goo.gl/Y0ZkNV)

The webcam does not work. it displays on the console that “only safe origin is allowed”, I am accessing a web application on the server. I am using 192.168.1.11/myApp to access my system. it does not work in chrome, but it works in firefox. I am updating the version of my Chrome browser.

although I read some problem like this, but I could not fix it myself. 127.0.0.1, localhost, https, etc. is a safe origin. I do not know if the server ip address is one of the reliable sources.

Can I change 192.168.1.11/myApp to what?

+7
angularjs getusermedia webcam
source share
3 answers

If your site works as http, you can try to configure it as https. Like this.

+7
source

You need to use https instead of http. If you do not want to spend money on certificates and want to have something other than a self-signed certificate, you can use certbot to create free certificates. (see https://certbot.eff.org ) Honestly, for your case, its local network, and it should not work, but for others, here are the instructions for linux (tested on ubuntu 14 lts)

  • log in to your ssh as root or sudoer, you can go to any selected directory that you have permissions on, and enter the following:

    wget https://dl.eff.org/certbot-auto

    chmod a + x./certbot-auto

(if anyone who is interested in creating posts can understand why this will not appear as code above and fix it ...)

Now you can automatically generate signed certificates within 90 days using

./certbot-auto 

every 90 days you can run

 ./certbot-auto renew 
+2
source

change your url from http to https

0
source

All Articles