Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2270 Представления

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 ?

Аватар
Отменить
Лучший ответ

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 !

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
июл. 23
1846
0
янв. 24
1658
0
мая 24
1165
0
мая 18
4124
3
сент. 21
8700