Created
September 23, 2024 16:11
-
-
Save fzn0x/d41864e95c7412087b859139ef49aa1b to your computer and use it in GitHub Desktop.
Creating server proxy to localhost with vite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: { | |
proxy: { | |
"/image": { | |
target: "https://_.s3.ap-southeast-1.amazonaws.com", | |
changeOrigin: true, | |
rewrite: (path) => path.replace(/^\/image/, ""), | |
}, | |
}, | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
localhost by any means it's the same host which the server runs