Help with ninja session cookie

50 views
Skip to first unread message

Avinash Bojja

unread,
Mar 9, 2018, 7:15:42 AM3/9/18
to ninja-framework
Hi All,
I am trying to set the domain name of the cookie dynamically.
I know that we can set it through application conf,but i need it to dynamically pick from the host from which a request comes.
Any suggestions and help will be gratefull.

Thanks,
Avinash

Raphael André Bauer

unread,
Mar 9, 2018, 4:10:29 PM3/9/18
to ninja-f...@googlegroups.com
Not sure if I understand it correctly. But if you don't specify the
application.cookie.domain property, then Ninja's sessions won't set
any domain. Which in turn means the session cookie is only valid for
the domain where the request comes from (the browser enforces this).
Is that maybe already what you have in mind?
Cheers,
Raphael
> --
> You received this message because you are subscribed to the Google Groups
> "ninja-framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ninja-framewo...@googlegroups.com.
> To post to this group, send email to ninja-f...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ninja-framework/1661adf8-1312-4e7a-a729-4e16da61ed05%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Avinash Bojja

unread,
Mar 12, 2018, 6:25:53 AM3/12/18
to ninja-framework
Hi,
Thanks for the reply.To explain things clearly.We have two domains xyz.com and abc.xyz.com. Until now we specified the domain as .xyz.com and both the domains authenticated perfectly.But now i want to be able to serve the domains with client's url(White labeling)-such as xyz2.com and abc.xyz2.com.So i want ninja session cookie to dynamically take domain name so that i can serve the cookie as per my need.
Reply all
Reply to author
Forward
0 new messages