ScandiPWA allows you to create a proxy middleware by using the http-proxy-middleware
package in the file src/setupProxy.js
.
For example:
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function(app) {
app.use(
'/graphql',
createProxyMiddleware({
target: '<http://localhost:5000>',
changeOrigin: true,
})
);
};
<aside> ✅ You can learn more about the proxy server on the Configuring proxy manually section of the Storefront mode setup page.
</aside>