Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
11611 Widoki

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

Awatar
Odrzuć

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.

Najlepsza odpowiedź

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


Awatar
Odrzuć
Autor

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

Najlepsza odpowiedź

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}


Awatar
Odrzuć
Najlepsza odpowiedź
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)


Awatar
Odrzuć

Exactly!

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

Powiązane posty Odpowiedzi Widoki Czynność
2
lis 19
6937
4
gru 23
25308
1
paź 21
4780
3
sie 21
10455
4
lis 17
5989