No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    HTTPS Dev server with Cordova

    Help
    cordova dev https server webpack
    6
    8
    1637
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      driedler last edited by driedler

      Chrome requires an https domain to access the media APIs.

      The last comment of this post:
      https://github.com/quasarframework/quasar/issues/701
      Seems to indicate that https is now supported.

      I see quasar 0.15.14 has a ‘https’ option in the ‘dev’ section of the quasar.conf.js. However, setting it to ‘true’ doesn’t seem to have any effect after running:
      quasar dev -m cordova -T browser

      Does anyone have any pointers on how to enable https for the dev server?

      1 Reply Last reply Reply Quote 0
      • D
        driedler last edited by

        The https option appears to be disabled for cordova and electron builds, commenting out ‘cfg.devServer.https = false’ in <project>/node_modules/quasar-cli/lib/quasar-config.js eveything works:

          if (this.ctx.mode.cordova || this.ctx.mode.electron) {
            // cfg.devServer.https = false
            cfg.devServer.open = false
            cfg.devServer.compress = false
          }
        1 Reply Last reply Reply Quote 1
        • N
          Narmer23 last edited by

          Is there any update on this issue? Creating an HTTPS session on the web server for Cordova seems not configurable, and using Cordova plugins like geolocation requires the HTTPS protocol. The workaround of @driedler is indeed working, but it’s not sustainable.

          1 Reply Last reply Reply Quote 0
          • S
            saaraesfehani2 last edited by

            could you explain more…
            I have the same problem

            1 Reply Last reply Reply Quote 0
            • N
              Narmer23 last edited by Narmer23

              The Quasar devServer can be started in an HTTPS enviroment setting the https attribute in quasar.conf.js:

              devServer: {
                https: true
               [...]
              }
              

              Unfortunately this setting is ignored when starting the devServer in Cordova or Electron mode, since false is hard-coded in <project>/node_modules/quasar-cli/lib/quasar-config.js line 528:

                else if (this.ctx.mode.cordova || this.ctx.mode.electron) {
                  Object.assign(cfg.devServer, {
                    https: false,
                    open: false
                  })
                }
              

              Changing here the https value to true “solves” this issue, but being inside the library it’s not a good way to solve it. We should have the possibility to configure it from the project’s quasar.conf.js.

              1 Reply Last reply Reply Quote 1
              • Frosty-Z
                Frosty-Z last edited by Frosty-Z

                I’ve created an issue here: https://github.com/quasarframework/quasar-cli/issues/194

                1 Reply Last reply Reply Quote 1
                • rstoenescu
                  rstoenescu Admin last edited by

                  Released quasar-cli v0.17.24 which has the necessary logic to allow HTTPS to run for Cordova too.

                  1 Reply Last reply Reply Quote 0
                  • dobbel
                    dobbel last edited by dobbel

                    has this been fixed in V1 beta too? In beta4 you still have hack quasar.conf.js to get https working for Cordova .

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post