API Routes work with Postman, but not client

My server app is using express, express-session, passport and cors.

My /login, /is_logged_in, /logout routes work when tested from Postman, but not when testing from my client.

When testing from Postman, in my login route, I checked req.rawheader and I can see the connect.sid value. When testing from my client, req.rawheader never has the connect.sid value.

I copied the code from the Postman Code Snippet into my client, but still no luck,

I have tried this solution, and still no luck.

Why do the routes work from Postman, but not my client? What settings am I missing?

Hey @supply-pilot-8642206 :wave:

Welcome to the Postman Community! :postman:

This feels more like a local code problem and might be outside of the scope of the Postman Community forum.

I think the best option would be to explain the full issue, with your local code snippets on a new Stackoverflow post to get some direct help with your implementation.

Happy to help on the Postman side but as you mentioned that it’s working through Postman, it’s a little harder to point you to a possible solution.

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