Openworx / backend_theme

Odoo Backend Theme
156 stars 242 forks source link

[BUG] material-background.jpg is requested via http #42

Closed melroy89 closed 6 years ago

melroy89 commented 6 years ago

Hi,

I'm using Nginx, but I see for some reason that 1 file is getting requested over HTTP (instead of HTTPS). Which results in a browser warning so called Mixed content error.

It concerns this image request: backend_theme_v11/static/src/img/material-background.jpg

Firefox network developer list: non_https_request

Resulting in mixed content problem.

Could be related? https://github.com/pallets/flask/issues/773

Thanks in advance.

Kind regards, Melroy

mgielissen commented 6 years ago

Check system parameter web.base.url if https is used. If you have http, you get mixed content.

melroy89 commented 6 years ago

@mgielissen Well, first good guess. But I change the web.base.url to https. I restarted Odoo and Nginx/PHP-fpm services. I cleared all browser caching, local data, cookies, site storage. But I still keep getting mixed content some how. See screen below.

On my server https://erp.melroy.org. You can login with 'demo' / 'demo' on the testing database.

My Nginx config has the correct proxy settings:

 # Add Headers for odoo proxy mode
 proxy_set_header X-Forwarded-Host $host;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Proto $scheme;
 proxy_set_header X-Real-IP $remote_addr;

Also enabled proxy_mode = True in Odoo config.

Are you sure this is the only fix? Am I the only one? still_not_fixed

Ps. Without backend_theme installed I do NOT have mixed content.

melroy89 commented 6 years ago

@mgielissen Please reopen issue.

melroy89 commented 6 years ago

After doing all the changes. The problem with mixed content was still there, as you know.

However, the only solution was to REinstall the backend_theme once more. Now it works, without mixed content. It doesn't sound like a good solution, but more like a workaround. Any idea why a reinstall is needed?

mgielissen commented 6 years ago

In odoo.conf is Proxy_mode = True?

melroy89 commented 6 years ago

Yes I did that. But I really need to reinstall the theme to get it working. I think there is some caching going on within Odoo (or the Odoo Database). Very fuzzy.

I don't know how to find the root cause of this. Since all the configs where OK, including the proxy_mode, proxy forward settings, web.base.url.. I restarted Odoo as well.. Only reinstalling helped.

melroy89 commented 6 years ago

Well let's close it. but ok, I still think something fishing is going on here.

dbwelch commented 5 years ago

I get same error, on Ubuntu, surely there is another method other than reinstalling the theme...!

ableabhijeet commented 5 years ago

I am also getting this error.

TheCloneMaster commented 5 years ago

same here... all nginx and proxy_mode settings are there tried re-installing but error is still there

dndoanh commented 5 years ago

first, update setting 'web.base.url' in system parameters second, update company dashboard background. you can use old picture if needed