proxyhtml
https://webpack.js.org/configuration/dev-server/#devserverproxywebpack
https://webpack.docschina.org/configuration/dev-server/#devservergit
// webpack.config.js module.exports = { devServer: { proxy: { '/api': 'http://localhost:3000' } } };
middlewaregithub
https://github.com/chimurai/http-proxy-middleware#tldrweb
var express = require('express'); var proxy = require('http-proxy-middleware'); var app = express(); app.use( '/api', proxy({ target: 'http://www.example.org', changeOrigin: true }) ); app.listen(3000); // http://localhost:3000/api/foo/bar -> http://www.example.org/api/foo/bar
Chrome & CORS & Fetch API & Chrome 多開,應用分身chrome