Skip to content

Noob Question - How to make proxy take into account full path requested (when I request /auth/status from app it proxies /auth only)? #3700

Answered by neelkarma
neelkarma asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind, I figured it out - here's my revised config:

export default defineConfig({
  // ...
  server: {
    proxy: {
      "^/(api)|(auth)": {
        target: "http://localhost:8000",
        changeOrigin: true,
        secure: false
      },
    }
  }
  // ...
}); 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by neelkarma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant