notherbase-fs 4.0.17 → 4.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/notherbase-fs.js +4 -0
  2. package/package.json +1 -1
package/notherbase-fs.js CHANGED
@@ -11,6 +11,7 @@ import SpiritWorld from "./controllers/spirit-world.js";
11
11
  import favicon from 'serve-favicon';
12
12
  import session from 'express-session';
13
13
  import MongoStore from 'connect-mongo';
14
+ import cors from 'cors';
14
15
 
15
16
 
16
17
  /**
@@ -28,6 +29,8 @@ class NotherBaseFS {
28
29
 
29
30
  //be safe, needs to be before session
30
31
  if (process.env.PRODUCTION == "true") this.app.set('trust proxy', 1);
32
+
33
+ this.app.use(cors());
31
34
 
32
35
  let baseKeys = Object.keys(this.bases);
33
36
  let mongoStore = MongoStore.create({ mongoUrl: process.env.MONGODB_URI });
@@ -43,6 +46,7 @@ class NotherBaseFS {
43
46
  proxy: process.env.PRODUCTION == "true",
44
47
  cookie: {
45
48
  secure: process.env.PRODUCTION == "true",
49
+ sameSite: process.env.PRODUCTION == "true" ? 'none' : 'lax',
46
50
  maxAge: 1000 * 60 * 60 * 24 * 28 // 28 days
47
51
  }
48
52
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notherbase-fs",
3
- "version": "4.0.17",
3
+ "version": "4.0.19",
4
4
  "description": "Functions to help make developing for NotherBase easier.",
5
5
  "exports": "./notherbase-fs.js",
6
6
  "scripts": {