Session Issue
#1951
Replies: 1 comment
-
There is a chance it is a CORS issue, is the ajax call performed on the same host as your REST API server? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Guys,
I have created REST API server using the Drogon library, I have also enabled the sessions in Drogon.
I tested everyting using POSTMAN, and sessions and everything works perfectly.
Then i create a simple login.php and dashboard.php
login.php using ajax connects to rest api server and logins successully. And i do this req->session()->insert("loggedIn", true);
now if my browser page is changed to dashboard.php and i have an ajax call going to REST api server, then it
seems that REST API is treating this as a new session.
in my Filter when i call bool loggedIn = req->session()->getOptional("loggedIn").value_or(false); it comes as False,
Need help on this pls.
Beta Was this translation helpful? Give feedback.
All reactions