diff options
author | 2021-09-06 23:13:22 +0200 | |
---|---|---|
committer | 2021-09-06 23:13:22 +0200 | |
commit | 569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a (patch) | |
tree | 8d1cb94a56d60b9d726222277b7516fc59895613 /hocs | |
parent | 275bd1d0a9aea90696c145cf992d522a0d6b0aa8 (diff) | |
download | my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.tar.gz my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.tar.bz2 my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.zip |
added stadard linter
Diffstat (limited to 'hocs')
-rw-r--r-- | hocs/withSession.js | 8 |
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' + } }) } |