Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Update quasar-config.js #3660

wants to merge 1 commit into from

Conversation

djpate
Copy link

@djpate djpate commented Mar 23, 2019

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

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 your quasar.conf.js

@rstoenescu
Copy link
Member

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?

@rstoenescu
Copy link
Member

Also, maybe this is where the confusion lies. Are you running on latest @quasar/app version? Support for HTTPS on Cordova dev builds has been added in beta.9 (latest version as I write these lines is beta.13).

@djpate
Copy link
Author

djpate commented Mar 26, 2019

@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
apache/cordova-plugin-geolocation#123

@nothingismagick
Copy link
Contributor

nothingismagick commented Mar 26, 2019 via email

@djpate
Copy link
Author

djpate commented Mar 26, 2019

@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

@djpate djpate closed this Mar 26, 2019
@nothingismagick
Copy link
Contributor

Glad to know it worked for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants