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?
Solution:Jump to solution
Update: I wasn't including
credentials: true
in my fetch
call to hit the endpoint, after that it started working.
For the typing, this worked:
```
app.post('/print_auth', async (req: Request, res: Response) => {...1 Reply
Solution
Update: I wasn't including
credentials: true
in my fetch
call to hit the endpoint, after that it started working.
For the typing, this worked: