[CAN’T BE SOLVED] Android build with proxy server



  • This may off-topic of quasar but hope anyone could help

    I set proxy server in quasar config.

    devServer: {
      // https: true,
      // port: 8080,
      open: true, // opens browser window automatically
      proxy: {
        // proxy all requests starting with /api to jsonplaceholder
        '/api': {
          target: 'http://localhost/cbccvc_dev/',
          changeOrigin: true,
          pathRewrite: {
            '^/api': ''
          }
        }
      }
    },
    

    Now with android build, url will not open external link through proxy. When debug app return a file:// link like file:///api/index.php?option=com_api&controller=core&task=login

    So how could I keep android app to understand proxy setting when build. Hope anyone could help. Tks



  • I look around and Ionic has exact the same proxy setting as quasar

    https://ionicframework.com/docs/v3/cli/configuring.html#service-proxies

    Hope anyone know how to port this to quasar mobile app



  • After testing I find out Ionic CLI is the same quasar, mean proxy just work as a normal reverse proxy on Pc environment.

    So I want to confirm that there is NO way to make proxy work with a cordova build atm (not sure if someone make a plugin in future that control xhr call and divert through a native proxy)



  • Did you solve that problem?


Log in to reply