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: { "^/graphql": "/graphql" },
|
||||
xfwd: true,
|
||||
onProxyReq: function (proxyReq, req, _res) {
|
||||
onProxyReq(proxyReq, req, _res) {
|
||||
const auth = proxyReq.getHeader("authorization");
|
||||
if (auth) {
|
||||
// pass along user provided authorization header
|
||||
|
|
@ -20,8 +20,8 @@ export default createProxyMiddleware({
|
|||
let token = req.cookies["__Secure-next-auth.session-token"];
|
||||
if (!token) token = req.cookies["next-auth.session-token"];
|
||||
|
||||
//console.log(req.body);
|
||||
//if (req.body.query) console.log(req.body.query);
|
||||
// console.log(req.body);
|
||||
// if (req.body.query) console.log(req.body.query);
|
||||
if (token) {
|
||||
proxyReq.setHeader("authorization", `Bearer ${token}`);
|
||||
proxyReq.removeHeader("cookie");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue