stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.94k stars 174 forks source link

Cookies misbehave when runned on stackblitz using `cookie-session` #1534

Open noam-honig opened 1 month ago

noam-honig commented 1 month ago

Describe the bug

Using express & cookie-session - some sessions are saved, others loose their signature and are disabled. It seems that the cookies are parsed wrongfully - only on web containers.

Link to the blitz that caused the error

https://stackblitz.com/edit/stackblitz-starters-m9nszw?file=index.js

Steps to reproduce

  1. Goto https://stackblitz.com/edit/stackblitz-starters-m9nszw?file=index.js
  2. Click on the first link - you'll see that a cookie with a user info for user named alex is saved and works
  3. Clink on the second link - you'll see that the same code doesn't work when the user is named 'steve'

Expected behavior

The cookies should work consistently

Parity with Local

Screenshots

When the cookie is saved it looks like this: image And when it doesn't it looks like this: image

Platform

Additional context

No response