-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update quasar-config.js #3660
Update quasar-config.js #3660
Conversation
Hi, I don't understand this request. First, you shouldn't tamper with APP_URL. Second, just enable "devServer > https: true" in quasar.conf.js. What am I missing? |
Also, maybe this is where the confusion lies. Are you running on latest |
@rstoenescu The issue with https: true is that even though it does use https, chrome does not allow the origin since it's not localhost but an IP reachable by the emulator. In my case, it's something like https://192.168.0.5. Since it's an IP, I can't create an SSL cert for it which means I can't get geolocation to work at all locally. It's been an issue for a little while now. https://forum.ionicframework.com/t/ionic-geolocation-only-secure-origins-are-allowed-error/61333/24 |
This might be a way for you to make an SSL cert locally:
https://blog.filippo.io/mkcert-valid-https-certificates-for-localhost/
… |
@nothingismagick Thank you, that solved my issue. I generated a cert for my local ip using mkcert. (Something you can't do with letsencrypt) and setup the webpack dev server to use the generated pems. I then added to root CA to my emulator and it worked like a charm! Thanks again |
Glad to know it worked for you. |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
This allows setting APP_URL manually instead of relying on the script to figure it out for you. this is useful in local environments while testing features that require a valid SSL cert.
My use case is geolocation. As-is Cordova's geolocation won't work in Android because chrome will block the request saying the origin is not allowed. The only way around that is to serve over SSL and have a valid cert. I can fix that issue with ngrok but I need to inject the proper url.
In order to use this, just set APP_URL in your the
build
section of yourquasar.conf.js