I would like to set up a proxy to facilitate local front-end development.
For example if I go to https://google.com/ all files are loaded from Google, except for some defined set of files like all *.css files, which would come from the file system.
Right now I am using Fiddler to achieve that goal, but it is very manual and not easily set up for other developers. If it is possible with Fiddler, I am assuming it is possible to automate that set up. I have tried lots of configurations and researched
If possible I would like to achieve this with webpack-dev-server, or some other scriptable web framework like Express. The developers have access to their host files to make any local DNS changes that might be required. Ideally the set up would work on Windows and Mac, but Windows is the larger target.
Here is an example of what the webpack devserver config might look like:
devServer: {
hot: false,
open: true,
liveReload: false,
https: true,
watchContentBase: true,
compress: false,
allowedHosts: [
'google.com'
],
host: "google.com",
proxy: {
"*.css": {
target: "http://localhost:3000"
},
"*": {
target: "https://google.com/",
secure: false,
changeOrigin: true,
}
}
}