- multple apps sharing the same cookie domain
- one app (express.js) is using a secure cookie
express:sess
andexpress:sess.sig
- the hapi.js app tries to parse these cookies and fails returning 400 BadRequest error to client
I don't want hapi to return an error response to the client just because it gets a cookie it cant parse and doesn't care about. I tried setting
server.config({
state: {
cookie: {
failaction: "log"
}
}
// other config omitted
});
but cookie
or { state: { failAction: ... }}
was not allowed and prevented the server from starting.
server.connection({
host: "0.0.0.0",
port: 8081,
routes: {
cors: true
},
state: {
ignoreErrors: true // <== this works
}
});
It's not entirely clear form the docs what to do but peeking at the source for statehood shows it is expecting an object that has property ignoreErrors
-- nthing at all like what the hapi docs say.