Only secure origins are allowed (see: https://goo.gl/Y0ZkNV)

L.. picture L.. · Dec 23, 2015 · Viewed 29.4k times · Source

Webcam not working. it display on a console that "Only secure origins are allowed", I accessing the web app in the server. I'am using 192.168.1.11/myApp to access my system. it is not working in chrome but in firefox its working. I update the version of my chrome browser..

although I read some problem like this but i cant fixed it with myself.. 127.0.0.1, localhost, https etc are the secure origins.. I dont know if the ip address of the server is one of the secure origins.

can i change 192.168.1.11/myApp to what?

Answer

Gall Annonim picture Gall Annonim · Nov 10, 2016

You need to use https instead of http. If you dont want to spent money for certificates and want to have other than self-signed one, you can use certbot to generate yourself certificates that are free. (see https://certbot.eff.org) Frankly, for your case, its local network and it shouldn't work, but for others, here are instructions for linux (tested on ubuntu 14 lts)

  1. login to your ssh as root or sudoer, you may want to go to any choosen directory that you have permissions to and type following:

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

    chmod a+x ./certbot-auto

(if anybody keen on making posts could figure why that above wont show up as code and fix it...)

from now on you can automatically generate signed certifiactes for 90 days using

./certbot-auto

every 90 day you may want to run

./certbot-auto renew