XMLHttpRequest at 'http://localhost:3000/api' from origin 'http://127.0.0.1:3000' has been blocked

chenyeah
0
chenyeah
commented 25 days ago

Access address http://127.0.0.1:3000 have some problems

proxy: {
    "/api": {
      target: "http://127.0.0.1:8080",
      pathRewrite: {
        "^/api": "/"
      }
    }
  }
this.$axios.$post("/api", {
      firstName: "Fred",
      lastName: "Flintstone"
    });

image

But address http://localhost:3000 have no problems

0
Informations
Question โ€ข Unresolved
#c15 - Created 25 days ago