浏览代码

Bug fix: cookies were not working across subdomains.

Lee Morgan 5 年之前
父节点
当前提交
e72fd50691
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app.js

+ 2 - 1
app.js

@@ -38,7 +38,8 @@ app.use(session({
     secret: "Super Secret Subline Subliminally Saving Secrets So Sneaky Snakes Stay Sullen. Simply Superb.",
     cookie: {secure: true},
     saveUninitialized: true,
-    resave: false
+    resave: false,
+    domain: process.env.COOKIE_DOMAIN
 }));
 app.use(express.urlencoded({extended: true}));
 app.use(express.json());