Replies: 1 comment 2 replies
-
I'm not totally sure what you're trying to do. I think you're trying to set a cookie cross-origin, is that right? If so, that's generally not possible, independent of Rocket. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I use
cookie.add(Cookie::new("name", "Shanto"));
, it sets the cookie for the same domain.But when I use it for a different domain/client, it doesn't set the cookie.
For example when I visit
https://127.0.0.1:8000/login
with browser or make a fetch request from that domain the below code works fine. It sets the cookie.But when I request from
https://127.0.0.1:3000
tohttps://127.0.0.1:8000/login
it doesn't set the cookie.How can I set the cookie for different domain?
My login route is:
My main function is:
I am using
rocket = 0.5.0-rc.2
rocket_cors = github master branch
Beta Was this translation helpful? Give feedback.
All reactions