Skip to content

Commit 907d84a

Browse files
committed
Merge branch 'fix/secure-cookies' into develop
* fix/secure-cookies: Only use cookies in HTTPS mode.
2 parents e19383d + 815538c commit 907d84a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/create-app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function initWebId (argv, app, ldp) {
159159

160160
// Store the user's session key in a cookie
161161
// (for same-domain browsing by people only)
162-
const useSecureCookies = argv.webid // argv.webid forces https and secure cookies
162+
const useSecureCookies = !!argv.sslKey // use secure cookies when over HTTPS
163163
const sessionHandler = session(sessionSettings(useSecureCookies, argv.host))
164164
app.use((req, res, next) => {
165165
sessionHandler(req, res, () => {

0 commit comments

Comments
 (0)