I have a odoo instance behind a nginx proxy. Everything works fine but when i logout the redirect url is incorrect (the base url is lost). Any ideas?
Thnx
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have a odoo instance behind a nginx proxy. Everything works fine but when i logout the redirect url is incorrect (the base url is lost). Any ideas?
Thnx
I found a solution. Looking for the logout controller function I've seen that allows a parameter. I have made a nginx rewrite: rewrite /web/session/logout /web/session/logout?redirect=https://$host $break;
Invalid parameter "$break" How do I make this work?
Changes required on nginx default or nginx's conf file.
Add below code under section where your are Redirecting requests to odoo backend server
====================== Syntax ===================================
location / {
proxy_pass http://odooapplicationurl:port;
proxy_redirect http://odooapplicationurl:port/ https://yourapplicationdomain/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
============================ Example ================================
location / {
proxy_pass http://192.168.0.1:8069;
proxy_redirect http://192.168.0.1:8069/ https://mycompanyodoo.com/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
========================== Justification ===================================
Odoo logout controller returns 301 http code.
Nginx require below headers in conf file when 301 http code return by application else odoo application will show bad request 400.
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
0
ก.ย. 16
|
4351 | ||
|
0
ต.ค. 23
|
978 | ||
|
0
ต.ค. 22
|
3786 | ||
|
1
พ.ย. 20
|
3951 | ||
|
3
พ.ย. 20
|
9129 |
Please provide a proper error log and your nginx config if necessary.