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

    ProxyTable for Ajax Requests is not working

    Framework
    2
    6
    3157
    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.
    • N
      netaneledri last edited by

      Hey,

      I built app using quasar, and I decided to upgrade the project to use quasar webpack 2.
      So after I create new project and move the components and everything I have one big problem.

      For making api request Im using ProxyTable option in config/index.js for proxing ajax requests.

      The problem is its not working… In the previous project it used to work.

      This is my config/index.js file:
      https://pastebin.com/brE3zeRZ

      I really need to work on this app but I cant to send any ajax request…
      The proxy is not do anything…

      Thanks.

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

        I can confirm it works. It depends on how you did the upgrade. Maybe you missed something?

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

          @rstoenescu I just placed the config like you see in pastebin. and then make ajax request using axios/vue-resource with url /api/… and its try to send request to localhost:8080/… and not proxy the request. get error 500 in network

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

            Lose the asterisk character: /api* should be /api.

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

              Still not working.

              This is the proxyTable config:
              proxyTable: {
              ‘/api’: {
              target: ‘https://dev.greeninvoice.co.il/api/v1’,
              changeOrigin: true,
              pathRewrite: {
              ‘^/api’: ‘’
              }
              }
              }

              and this is the request code:

              	return Vue.http.post('/api/account/login', payload).then((response) => {
              		debugger
              		return response.data
              	})
              

              getting: http://localhost:8080/api/account/login 500 (Internal Server Error)

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

                Seems like discussion moved to Gitter. User error in this case.

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