跳至內容
選單
此問題已被標幟
4 回覆
11006 瀏覽次數

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

頭像
捨棄

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.

最佳答案

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


頭像
捨棄
作者

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

最佳答案

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}


頭像
捨棄
最佳答案
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)


頭像
捨棄

Exactly!

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

相關帖文 回覆 瀏覽次數 活動
2
11月 19
6570
4
12月 23
24234
1
10月 21
4333
3
8月 21
9803
4
11月 17
5546