You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside createCookieSessionStorage i would like my secret and domain come from the env variables defined in context but i can't find a way to bring them here, sorry i'm new to remix
import{createCookieSessionStorage}from"@remix-run/cloudflare";import{createThemeSessionResolver}from"remix-themes";// You can default to 'development' if process.env.NODE_ENV is not setconstisProduction=process.env.NODE_ENV==="production";constsessionStorage=createCookieSessionStorage({cookie: {name: "theme",path: "/",httpOnly: true,sameSite: "lax",secrets: ["s3cr3t"],
...(isProduction
? {domain: "your-production-domain.com",secure: true}
: {}),},});exportconstthemeSessionResolver=createThemeSessionResolver(sessionStorage);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Inside
createCookieSessionStorage
i would like my secret and domain come from the env variables defined in context but i can't find a way to bring them here, sorry i'm new to remix// server.ts
// sessions.server.tsx
Beta Was this translation helpful? Give feedback.
All reactions