aboutsummaryrefslogtreecommitdiffstats
path: root/hocs
diff options
context:
space:
mode:
Diffstat (limited to 'hocs')
-rw-r--r--hocs/withSession.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/hocs/withSession.js b/hocs/withSession.js
index 0361db3..fc8f40d 100644
--- a/hocs/withSession.js
+++ b/hocs/withSession.js
@@ -1,14 +1,14 @@
// this file is a wrapper with defaults to be used in both API routes and `getServerSideProps` functions
-import {withIronSession} from 'next-iron-session'
+import { withIronSession } from 'next-iron-session'
-export default function withSession(handler) {
+export default function withSession (handler) {
return withIronSession(handler, {
password: process.env.MYAPPS_SECRET_COOKIE_PASSWORD,
cookieName: 'myapps_session',
cookieOptions: {
// the next line allows to use the session in non-https environments like
// Next.js dev mode (http://localhost:3000)
- secure: process.env.NODE_ENV === 'production' ? true : false,
- },
+ secure: process.env.NODE_ENV === 'production'
+ }
})
}