I have the following scenario:
I am currently using a browser extension to access company resources via a proxy server (proxy.company.co.uk:3128) for any url that ends with company.co.uk, but I now need my webpack dev server to be able to access those resources aswell. I tried looking at the http-proxy-middleware
repo, but only found one unaswered question on the matter and a toProxy
flag with no explaination on how to use it.
My current proxy config is very basic:
devServer: {
historyApiFallback: true,
hot: true,
host: '0.0.0.0',
port: 3010,
proxy: {
'/api': {
target: 'https://env-01.dev.company.co.uk/v4/',
pathRewrite: { '^/api': '' },
changeOrigin: true,
},
},
},
Has anyone had any success with such a setup or has ideas on how to achieve this proxying to a reverse proxy?