This question has been flagged
8 Replies
5767 Views

Dear All,

I was setup odoo run with nginx proxy using ssl and enable live chat support, but browse always block live chat because it had mixed and insecure content from live chat module. Could you give me a advice to secure content of live chat module.

Thanks.

Lam

 

Hi All,
I had resolved it. Just go to : Setting/Parameters/System Parameters/web.base.url
Change it to https://xxxxxx.
It's all.
Thanks

Avatar
Discard
Best Answer

Hi guys,

Since there hasn't been any solution posted yet.
The web.base.url is by default reset when you would reboot your Odoo, that is default behaviour. There is a simple way to prevent this. Create a new parameter with the name 'web.base.url.freeze' and set the value to 'True'. This will prevent the web.base.url from being modified by Odoo and the web.base.url will keep working on HTTPS.

Yenthe

Avatar
Discard
Best Answer

This can a be problem with how you have configured Odoo. I had the same issue after configuring SSL and fixed it by doing below changes;

Once SSL is enabled using nginx, Odoo must be operational in multiprocessing mode in order to enable Live chat feature as Live Chat request redirected to longpolling port in nginx site configuration file.

example:

    # Handle longpoll requests
    location /longpolling {
        proxy_pass http://odoochat;
    }

when above is configured I also had to configure /etc/odoo.conf file as something like below.

[options]
; This is the password that allows database operations:
;admin_passwd = my_admin_passwd
db_host = False
db_port = False
db_user = odoo13
db_password = False
addons_path = /opt/odoo13/odoo/addons,/opt/odoo13/odoo-custom-addons
proxy_mode = True
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1
max_cron_threads = 1
workers = 8

note "workers", it must be set depending on your hardware configuration.

when SSL is enabled try issuing below command in terminal

sudo netstat -tulpn | grep 8072

if configuration is ok, you should see something like below;

tcp        0      0 127.0.0.1:8072          0.0.0.0:*               LISTEN      8223/python3

more info can be found at https://www.odoo.com/documentation/13.0/setup/deploy.html
Avatar
Discard
Best Answer


there is a very easy fix for this.

Add a new parameter 'web.base.url.freeze' and set the value to 'True'. This will prevent Odoo from updating your web.base.url.


credit: Yenthe666 https://github.com/Yenthe666 

Avatar
Discard
Best Answer

Hi, I have similar problem with odoo after I switch to https. Indeed the web.base.url key needs to be changed, but anytime I change it to https it is back to http after I logout and login again. Any suggestion how to solve this?


Avatar
Discard

the same for me ... anytime I change it to https it is back to http after I logout and login again.

Best Answer

Do you have `proxy_mode = True` in your config?

Avatar
Discard
Author

Dear Craig Barnes, Thank for your repply. Yes I have `proxy_mode = True` in my config, I using nginx upstream, proxypass.

I have a similar setup, but had not tested the online support module. Looking at it now I see that I have the same issue.

Looks like the service is not checking for the proxy X-Forwarded-Proto header value. Have you checked to see if this issue has been reported at github?