- Add
.env.development
with
HTTPS=true
PORT=3002
- Add http-proxy-middleware
yarn add http-proxy-middleware
- Add
setupProxy.js
in ./src
with
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function(app) {
app.use(
'/sapp',
createProxyMiddleware({
target: 'https://localhost:3002',
changeOrigin: true,
secure: false,
onProxyRes: (proxyRes, req, res) => {
Object.assign(proxyRes.headers, {
"Access-Control-Allow-Origin": "\*",
"Access-Control-Allow-Methods": "GET",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
})
},
pathRewrite: (path) => path.replace("/sapp/", "/"),
})
);
};
- Add Safe app in
rinkeby.gnosis-safe.io/#/app
with https://localhost:3002/sapp/
(make sure to add the /
at the end)