Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
12651 มุมมอง

I’m trying to set up Odoo 8 behind Nginx reverse proxy, where SSL termination is done on Nginx. The problem is that Odoo keeps setting the wrong protocol (http) when generating the URL for redirect_uri parameter for OAuth2 Google authentication.

I have the following HTTP headers set for proxy_pass:

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-Host $http_host;

proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto https;

proxy_set_header Front-End-Https On;

It seems Odoo doesn't care about these headers except for Host. Is there some other header I should set?

I also tried setting Odoo system parameters: web.base.url, but that has no effect either.

How can I force Odoo to use https when assembling URLs? Please help!

อวตาร
ละทิ้ง

Thank you so much for mention "proxy_set_header X-Forwarded-Host $http_host;". I missed this in my configuration. But now it works too. Thank you very much. Was trying to find the error since 2 days...

ผู้เขียน คำตอบที่ดีที่สุด

Problem solved. I was missing --proxy-mode option, or alternatively proxy_mode = True in openerp-server.conf. Without this option Odoo ignores X-Forwarded-... headers. 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
oauth_error=3 แก้ไขแล้ว
2
ม.ค. 22
9237
4
พ.ค. 24
9209
4
ธ.ค. 22
379
0
มิ.ย. 18
4503