Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off SSL check on Chrome and Firefox for localhost

Tags:

https

ssl

webrtc

I'm making a web app that uses WebRTC but it requires https. Is there any way to turn off SSL check on Chrome and Firefox for localhost only or is there any way to make use of WebRTC without https? Thanks.

like image 610
Tri Nguyen Avatar asked Apr 04 '18 22:04

Tri Nguyen


2 Answers

Chrome has chrome://flags/#allow-insecure-localhost which will ignore certificate errors on localhost. This makes development much easier.

like image 70
Philipp Hancke Avatar answered Oct 21 '22 09:10

Philipp Hancke


As @vcsjones said

Both Chrome and Firefox treat localhost as a secure context, so localhost should have access to secure context only features like webcam, geolocation, and WebRTC.

It is correct. However, Firefox changed (since Firefox 42) mozSrcObject to srcObject. I changed it to that and it worked.

like image 34
Tri Nguyen Avatar answered Oct 21 '22 07:10

Tri Nguyen