getSession Headers Type
I'm trying to access the user session from an endpoint in my express server:
However, the type that getSession expects for headers is Headers, but the type express gives me is IncomingHttpHeaders. How do I fix this?
However, the type that getSession expects for headers is Headers, but the type express gives me is IncomingHttpHeaders. How do I fix this?
Solution
Update: I wasn't including
For the typing, this worked:
credentials: true in my fetch call to hit the endpoint, after that it started working.For the typing, this worked: