angular and self-signed SSL cert - ERR_INSECURE_RESPONSE

angularjs, ssl

Solution

This does not really overcome the problem, but is a suitable workaround if you do web UX development and just need to see your changes in the browser in a dev env:

Whatever the backend api URL is that angular is calling, just open another tab to that URL and accept the invalid certificate warning in the browser. After this the app will work against the invalid certificate until you close the browser.

Tested in IE and Chrome.

Problem

I have a need to connect my angular $resources to a self-signed https web api. If I try to do that directly, I have messages such as ``` OPTIONS https://address/api/authentication net::ERR_INSECURE_RESPONSE ``` Is there a way to overcome this error, by any means specifying that this particular connection is trusted?

Original source

Related problems