Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2269 Widoki

Is it possible to have cross-domains sessions ? After looking at what kind of cookies were stored in the browser I noticed that they are specifically set on the domain. Would it be possible to manually set the domain?
For example, given test.com, foo\.test\.com\ and\ bar.test.com, with three different websites registered in odoo (one per domain) would it be possible to set the session cookie domain to test.com so that the sessionId can be retrieved on the other two subdomain websites too ?

Awatar
Odrzuć
Najlepsza odpowiedź

Bonjour Emanuel,
I know is too late, but I face the same issue latelly.

odoo doesn't seem to specify a domain for cookies, so the requested domain is always used (I guess by the browser). So it's one session per subdomain. 
It might be ok, or not.
If you want to use the same session on every sub domain, you have to set the cookie domain to the parent domain, test dot com in your exemple.
I manage to do this by using this hack on nginx configuration :

# force domain to use parent
proxy_cookie_path / "/;domain=--PARENT-DOMAIN-HERE--";

The session cookie created on either side is shared by both servers, and odoo can read and accept it each time.

I hope it helps !

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lip 23
1846
0
sty 24
1658
0
maj 24
1165
0
maj 18
4124
3
wrz 21
8699