79410011

Date: 2025-02-03 21:02:27
Score: 1
Natty:
Report link

o3-mini suggested me to add cookiePathRewrite to setupProxy.js and it solved my problem:

const {createProxyMiddleware} = require('http-proxy-middleware');
module.exports = function (app) {
    app.use(
        '/api',
        createProxyMiddleware({
            target: 'http://localhost:5000',
            changeOrigin: true,
            cookiePathRewrite: {
                '/refresh': '/api/refresh',
            },
        })
    );
};
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Stepan0806