Replies: 4 comments 6 replies
-
something like this app.use('*', async (c, next) => sessionMiddleware({
store,
encryptionKey: c.env.SESSION_ENCRYPTION_KEY,
expireAfterSeconds: 900,
cookieOptions: {
sameSite: 'Lax',
path: '/',
httpOnly: true,
},
})) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here is an example from the docs https://hono.dev/getting-started/cloudflare-workers#using-variables-in-middleware |
Beta Was this translation helpful? Give feedback.
0 replies
-
For CF, i guess it expects you to save env variables in |
Beta Was this translation helpful? Give feedback.
5 replies
-
I manage to solve this by using the following:
Then in my cookieSessionMiddleware:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
First of all, thanks for an awesome framework!
I am using hono-sessions from https://github.com/jcs224/hono_sessions
For this code snippet:
How can I pass the SESSION_ENCRYPTION_KEY? It is coming from an env.
Beta Was this translation helpful? Give feedback.
All reactions