Fix more build errors
This commit is contained in:
parent
1bdc1e60db
commit
30ce47826f
61 changed files with 1161 additions and 541 deletions
|
|
@ -8,7 +8,7 @@ export default createProxyMiddleware({
|
|||
changeOrigin: true,
|
||||
pathRewrite: { "^/api/v1": "/api" },
|
||||
xfwd: true,
|
||||
onProxyReq: function (proxyReq, req, res) {
|
||||
onProxyReq(proxyReq, req) {
|
||||
const auth = proxyReq.getHeader("authorization");
|
||||
if (auth) {
|
||||
// pass along user provided authorization header
|
||||
|
|
@ -17,7 +17,7 @@ export default createProxyMiddleware({
|
|||
|
||||
// Else extract the session token from the cookie and pass
|
||||
// as bearer token to the proxy target
|
||||
//const token = req.cookies["next-auth.session-token"];
|
||||
// const token = req.cookies["next-auth.session-token"];
|
||||
let token = req.cookies["__Secure-next-auth.session-token"];
|
||||
if (!token) token = req.cookies["next-auth.session-token"];
|
||||
|
||||
|
|
@ -27,7 +27,6 @@ export default createProxyMiddleware({
|
|||
} else {
|
||||
console.error("no token found. proxied request to backend will fail.");
|
||||
}
|
||||
return;
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue