Hashi
Hashi
KPCKevin Powell - Community
Created by SpongeBob on 7/3/2024 in #back-end
Cookie from backend not getting set in frontend
I would guess there is domain difference maybe, like your cookie is being set to "localhost:5173" but you are trying to access it from "localhost:5000"
12 replies
KPCKevin Powell - Community
Created by SpongeBob on 7/3/2024 in #back-end
Cookie from backend not getting set in frontend
If there is no cookie showing, and there is no cookie send with the request there is no need to debug the code related to "protectRoute". First I would check if there is really "Set-Cookie" header being send upon login. If you can see it then, maybe you have invalid cookie value and the browser is ignoring "Set-Cookie" header
12 replies
KPCKevin Powell - Community
Created by SpongeBob on 7/3/2024 in #back-end
Cookie from backend not getting set in frontend
Well I guess if you are using chrome it should show under Application => Cookies.
12 replies
KPCKevin Powell - Community
Created by SpongeBob on 7/3/2024 in #back-end
Cookie from backend not getting set in frontend
The function for set cookie when is it invoked? Ideally you should be able to screenshot the response headers that contain the cookie in the network tab of the browser.
12 replies
KPCKevin Powell - Community
Created by Savio on 7/4/2024 in #back-end
MongoDB POST ISSUE
I don't know much about the stack of technologies you are using, but my guess is that you have registered '/users' to be PUT Method, but from the front-end you are using POST Method
7 replies
KPCKevin Powell - Community
Created by ~MARSMAN~ on 7/3/2024 in #back-end
Handling POST request in Express.js
Well I have no idea how to help you with that, but basically it works with HTTP and you have to make it work with HTTPS
34 replies
KPCKevin Powell - Community
Created by ~MARSMAN~ on 7/3/2024 in #back-end
Handling POST request in Express.js
Switch to https in postman and it will break there too most likely
34 replies
KPCKevin Powell - Community
Created by ~MARSMAN~ on 7/3/2024 in #back-end
Handling POST request in Express.js
here Origin is HTTPS
34 replies
KPCKevin Powell - Community
Created by ~MARSMAN~ on 7/3/2024 in #back-end
Handling POST request in Express.js
Oh I think I have an answer, I see HTTP there not HTTPS
34 replies
KPCKevin Powell - Community
Created by ~MARSMAN~ on 7/3/2024 in #back-end
Handling POST request in Express.js
Is the postman requesting to the same url as your "fetch()" function does, the "absolute url"?
34 replies
KPCKevin Powell - Community
Created by ~MARSMAN~ on 7/3/2024 in #back-end
Handling POST request in Express.js
Can you share also headers, url, payload being send through Postman?
34 replies
KPCKevin Powell - Community
Created by ~MARSMAN~ on 7/3/2024 in #back-end
Handling POST request in Express.js
If I understand correct the problem is the 404 response after submitting the form from the website, then a screenshot from the network tab for the request might be of some help, the headers, url, and payload for example.
34 replies