-
-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Labels
Description
Description
Hi, I have followed the guides at https://vike.dev/pageContext#custom but the values I pass are ALWAYS undefined, server-side and client-side.
...
import cookieParser from 'cookie-parser'
...
const app = express()
app.use(compression())
app.use(cookieParser())
...
const pageContextInit = {
urlOriginal: req.originalUrl,
// pageContext.headers – e.g. make cookies available over pageContext.headers.cookies
headers: req.headers,
cookies: req.cookies,
}
// +config.ts
export default {
passToClient: [
'headers',
'cookies',
]
}
terminal console output for headers
and cookies
is undefined, as well as the console output in Browser DevTools. I have also tried adding a hardcoded string value and that also returns undefined.