Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
11864 Visualizzazioni

I'm using odoo 14 ce website, I've built simple site with two pages home and contact us, then using translation I've translated the site into arabic language, every thin working fine, but one day later the translation doesn't work, and this message showen in cosole:

    Mixed Content: The page at 'https://xxx/ar/?fw=1' was loaded over HTTPS, but requested     an insecure XMLHttpRequest endpoint         'http://xxx/ar/website/translations/7a29797d51ca1976e69c2e366e5ed9c8c5529307?  mods=&lang=ar_001'.

  This request has been blocked; the content must be served over HTTPS


I'm hosting odoo with contabo vps and plesk obsidian , I've tried to add addional http directives

RewriteEngine On

RewriteCond %{HTTPS} !=on

RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Also I've added addional nginx directives:

if ($scheme != "https") {

rewrite ^ https://$host$uri permanent;

}

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto https;

 but nothing changed the same error and translation cann't loaded

Avatar
Abbandona

I have the same problem. I had 2 problems:

- I used Cloudflare in proxy mode, and half secure mode

- I did not add host forwarding in Nginx proxy

By updating the config, it is ok now.

Risposta migliore

https://stackoverflow.com/questions/51675245/mixed-content-warning-for-insecure-resources-from-odoo


"adding proxy_mode = True into the [options] section of odoo.conf (if you deployed using docker, put odoo.conf into /etc/odoo/odoo.conf, which in their docker-compose.yml example is a shared folder (./config:/etc/odoo)"

solved the issue for me


Avatar
Abbandona
Autore

Thanks for reply, I've tried proxy_mode = True , and other suggestions but not working.

And activate programing mode, go to Settings -> Technical -> Parameters
web.base.url https://xxxx.com
web.base.url.freeze True

Risposta migliore

I solved this problem in Odoo 14 by setting these headers in my Apache reverse proxy:

RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}


Avatar
Abbandona
Risposta migliore
Apparent Solution (Workaround)

This worked for me ONLY SHORTLY  : After some time  failed again!
This must be a bug in Odoo. It's not deployment. 

1) Visit "Settings/Website"  and set the "Standard" language to your new language once. Save.
2) Visit the "Translate"-Function on your old standard language.
3) Reset (if you wish) to your old standard.

4) set the domain name of website

Earlier responses disregarded that the server in this case is never called. The application does not create  a correct protocoll and the browser does not send the request at all.

( on V14.-20210104)


Avatar
Abbandona

Exactly!

There is no bug. It only needs a properly configured reverse proxy and then it works flawlessly.

Post correlati Risposte Visualizzazioni Attività
2
nov 19
7142
4
dic 23
25758
1
ott 21
5011
3
ago 21
10791
4
nov 17
6291