mebjas / html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
https://qrcode.minhazav.dev
Apache License 2.0
4.87k stars 960 forks source link

possible to drop the requirement for HTTPS on local network testing? #918

Open kunanyi opened 4 months ago

kunanyi commented 4 months ago

I have a web app running on a local server 192.168.1.10

This way I can point my mobile to there and test

But the requirement "Camera access is only supported in secure context like https or localhost" is a real pain

Not sure it's even possible do setup HTTPS on my local stack very easily at all

Any suggestions?

ShawnStoddard commented 4 months ago

The requirement is imposed by your browser. All modern browsers require HTTPS for a number of features including camera access.

I setup NGINX in front of my development stack and use it for TLS termination for both internal and external. Works well. Did have to host DNS internally, it one server can handle all those tasks.

On Mon, Apr 29, 2024, at 09:17, Hello wrote:

I have a web app running on a local server 192.168.1.10

This way I can point my mobile to there and test

But the requirement "Camera access is only supported in secure context like https or localhost" is a real pain

Not sure it's even possible do setup HTTPS on my local stack very easily at all

Any suggestions?

— Reply to this email directly, view it on GitHub https://github.com/mebjas/html5-qrcode/issues/918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARTX7NMVR62V7545S7VVKLY7ZB6LAVCNFSM6AAAAABG6KFICWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3DSMBSGYYDOMY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

FamousWolf commented 4 months ago

You could use something like ddev, a docker based local development environment which includes HTTPS

HaroldObasi commented 2 months ago

I tried ddev but it didnt work for me, but ngrok worked fine for