Skip to content

Instantly share code, notes, and snippets.

@fzn0x
Created September 23, 2024 16:11
Show Gist options
  • Save fzn0x/d41864e95c7412087b859139ef49aa1b to your computer and use it in GitHub Desktop.
Save fzn0x/d41864e95c7412087b859139ef49aa1b to your computer and use it in GitHub Desktop.
Creating server proxy to localhost with vite
server: {
proxy: {
"/image": {
target: "https://_.s3.ap-southeast-1.amazonaws.com",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/image/, ""),
},
},
},
@fzn0x
Copy link
Author

fzn0x commented Sep 23, 2024

localhost by any means it's the same host which the server runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment