// README: check the cookie from request headers in browser and replace this. const cookie = ""; const target = "https://.sharepoint.com"; const PROXY_CONFIG = { "/test/_layouts/*": { "target": target, "secure": false, "changeOrigin": true, "bypass": function (req, res, proxyOptions) { req.headers["origin"] = target; req.headers["cookie"] = cookie; } }, "/test/_api/*": { "target": target, "secure": false, "changeOrigin": true, "bypass": function (req, res, proxyOptions) { req.headers["origin"] = target; req.headers["cookie"] = cookie; } }, "/_api/*": { "target": target, "secure": false, "changeOrigin": true, "bypass": function (req, res, proxyOptions) { req.headers["origin"] = target; req.headers["cookie"] = cookie; } } } module.exports = PROXY_CONFIG;