Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make local network IP a secure context?

Many features of the web are not supported when in insecure contexts.

For example the crypto.subtle API is undefined if not running over https.

I had been developing over localhost and there is an exception here where the context is still considered secure, and everything was working fine.

However, now I am testing on my mobile device which means I am now connecting to 192.168.1.xxx from my computer. Because of this, it is no longer a secure context, and I have lost access to certain APIs that I need.

How can I fix this? How can I test my application on my mobile device using my computer's IP address, with access to APIs that are only available in secure contexts?

like image 720
David Callanan Avatar asked Oct 18 '25 16:10

David Callanan


1 Answers

You could create a self-signed certificate for your development server, and then explicitly bypass the SSL error:

enter image description here

like image 115
Guerric P Avatar answered Oct 20 '25 05:10

Guerric P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!