You are on page 1of 3

Enabling the

Microphone/Camera in
Chrome for (Local)
Unsecure Origins

Scott Carmichael
·
Follow
2 min read
·
Nov 21, 2018

635
9

Chrome’s security policy will only allow you to access your


device’s microphone/camera when a site’s has a secure origin.
See here for a detailed explanation about what a secure (and
unsecure) origin is. In summary; you need to host your site on
https or called localhost (for when in development).

This can cause problems if you’re using a dev environment like


Vagrant. You could have many named local websites configured.
Moving them all over to localhost could be a real pain; both
impractical and time consuming.

Photo by israel palacio on Unsplash


To ignore Chrome’s secure origin policy, follow these steps.

1. Navigate to `chrome://flags/#unsafely-
treat-insecure-origin-as-secure` in Chrome.

2. Find and enable the `Insecure origins treated


as secure` section (see below).

3. Add any addresses you want to ignore the


secure origin policy for. Remember to
include the port number too (if required).

4. Save and restart Chrome.

You might also like