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

    problem running app alongside http-proxy-middleware reverse proxy

    Help
    quasar.conf.js reverse proxy
    1
    1
    191
    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.
    • H
      hanchan last edited by

      I am having trouble getting my app running. I am using a different app as a simple http-proxy-middleware reverse proxy.

      Here is the config.json for the proxy:

      {
        "routes": [
          {"route": "/apache"         , "address": "http://localhost:8081"},
          {"route": "/basicAuthApp"   , "address": "http://localhost:4000"},
          {"route": "/codeRefBackend" , "address": "http://localhost:3000"},
          {"route": "/codeRefFrontend", "address": "http://localhost:3001"}
        ]
      }
      

      All my other apps are running fine but they are simply backend stuff. My quasar app is the one running on port 3001.

      In the quasar documentation https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-devServer it says:
      “Note: if you’re proxying the development server (i.e. using a cloud IDE), set the public setting to your public application URL.”

      With that in mind I have made this modification to quasar.conf.js:

          devServer: {
            https: false,
            port: 3001,
            open: false, // opens browser window automatically
            public: 'http://localhost/codeRefFrontend'
          },
      

      The app runs properly if I go to http://localhost:3001/ but if I go to http://localhost/codeRefFrontend/ the app doesn’t load.

      When I look at the source I see this code:

      <script type="text/javascript" src="app.js"></script><script type="text/javascript" src="vendor.js"></script></body>
      

      Both app.js and vendor.js are pointing to http://localhost/app.js and http://localhost/vendor.js . This, of course, is not correct. They should be pointing to http://localhost/codeRefFrontend/app.js and http://localhost/codeRefFrontend/app.js .

      I’ve been racking my brain trying to figure out how to tell the app to add the extra bit to the path.

      If anyone can point me in the right direction I would really appreciate it!!

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