Session handling behind reverse proxy

Hi All,

In development, session handling works ok. For instance, if I reload a page, the app stays in the page and reloads its content.

However, in production, if I hit reload, the app jumps to the login page. That’s because Meteor.user() becomes undefined after the refresh, which I use to check if there’s an active session present. Meteor.userId() is still valid and correct, but anything depending on Meteor.user() fails.

Production is behind nginx as reverse proxy.

Any ideas/pointers?

Thank you.

If you are still using Meteor v2 you can add communitypackages:fast-render

Hopefully I can get a chance to make updates for v3 soon, but I can’t promise anything. PR’s are of course welcome if you are so inclined.

Magic! It worked.

Thank you.

Are you using Meteor 3?