Community mailing list archives

community@mail.odoo.com

Re: Why odoo keep redirecting https://{base}/web to http://{base}/web/login?

by
Kai Zhu
- 04/21/2016 06:18:51
Thank you!

I’ve already modified web.base.url to the correct “https”, problem is still there.

Within odoo, it’s controlled by "return werkzeug.utils.redirect('/web/login', 303)”, I think werkzeug itself should be able to handle X-Forwarded-Proto correctly and set environ['wsgi.url_scheme’] to ‘https', but this will not propagate to odoo side by returned response object (wsgi applicant), then oodo’s http controller will handle the remain procedures.

Can’t really locate the exact problems here.

Exact problems as here:

On Apr 20, 2016, at 22:21, Kingsley <kingsleyuk2003@yahoo.com> wrote:

Go to System Parameters -> web.base.url -> value  . put your url there. And you should be fine.

On 20/04/2016 11:17, Kai Zhu wrote:

Hi Community,


I’ve already set "proxy_set_header X-Forwarded-Proto https;” in nginx,
and also set "proxy_mode = True” in odoo configuration.

But odoo do still redirect
https://{base}/web
to 
http://{base}/web/login

then nginx reverse proxy will redirect any http back to https, which produce a infinite redirect loop.

Why this behaviour? How to fix it? (not the dirty way to /addons/web/controllers/main.py)

Thank you!

K

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe