@rpcbase/server 0.158.0 → 0.159.0
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.
- package/express/session_middleware.js +12 -11
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ if (typeof SESSION_STORE_PORT === "string" && !validator.isPort(SESSION_STORE_PO
|
|
|
21
21
|
|
|
22
22
|
const hostname = CONTAINER_MODE === "native" ? "localhost" : "session-store"
|
|
23
23
|
|
|
24
|
-
console.log("
|
|
24
|
+
console.log("session-store hostname", hostname, "port", SESSION_STORE_PORT)
|
|
25
25
|
|
|
26
26
|
let session_middleware = null
|
|
27
27
|
|
|
@@ -77,16 +77,17 @@ setTimeout(async() => {
|
|
|
77
77
|
|
|
78
78
|
// WARNING: apparently doesn't work on localhost or .local domains
|
|
79
79
|
// https://stackoverflow.com/questions/1134290/cookies-on-localhost-with-explicit-domain
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
// TODO: WTF IS THIS
|
|
81
|
+
// if (CONTAINER_MODE !== "native" && typeof APP_DOMAIN === "string" && APP_DOMAIN.trim() !== "") {
|
|
82
|
+
// log("\n\n")
|
|
83
|
+
// log("SETTING COOKIE DOMAIN TO", APP_DOMAIN)
|
|
84
|
+
// log("SETTING secure", APP_DOMAIN)
|
|
85
|
+
// log("TRUST PROXY TRUE")
|
|
86
|
+
// log("\n\n")
|
|
87
|
+
// session_config.cookie.domain = APP_DOMAIN
|
|
88
|
+
// // session_config.cookie.secure = true
|
|
89
|
+
// session_config.cookie.sameSite = false
|
|
90
|
+
// }
|
|
90
91
|
|
|
91
92
|
|
|
92
93
|
session_middleware = session(session_config)
|