Cookies seem to be rewritten, malformed

I have a glitch project which serves a templated website. I have found that the browser is sending several cookies in the cookie: header, but my server running on glitch receives a different value for this header. The value it is receiving is a single character: =. Unfortunately this is an invalid cookie value, so cookie parsing would fail, and my hapi server would serve a 400 bad request. As an interim fix I have disabled cookie parsing on my server.

Does it seem plausible that some glitch infrastructure in between the client and my glitch project might be rewriting this header? At least this conclusion is where my debugging has left me. I would greatly appreciate any help, or info from others who may have experienced the same thing.



I do have the same problem and it looks like a glitch problem.
mine is even worse, I can’t even run the basic Hapi tutorial on the glitch anymore.

@marsPure I am also using hapi. In case it helps, one workaround is to add this to the server config to ignore cookie parsing errors:

const server = Hapi.server({
  // ...
  routes: { state: { failAction: 'ignore' } }
  // ...
1 Like


Our team is currently working to fix this. I will post an update here once it has been resolved.


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.