Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Editing Website : Mixed Content http and https

Subscribe

Get notified when there's activity on this post

This question has been flagged
DockerSSLHTTPS
6 Replies
12902 Views
Avatar
又一科技有限公司

I have a odoo site hosted in docker. The domain of the site is in Cloudflare. I am now using  "Flexible SSL" to make my site from http to https.


But it will show "Mixed Content: The page at 'https://www\.xxxxxx\.com/web\#action=178\&cids=1\&menu_id=116'\ was\ loaded\ over\ HTTPS,\ but\ requested\ an\ insecure\ frame\ 'http://www.xxxxx.com/'. This request has been blocked; the content must be served over HTTPS." when I try to edit the website. 

I tried to 

1. turn on the "Always HTTPS" option in Cloudflare

2. update the web.base.url to https:// instead of http://

but still not working. 


Anyone can help on it? Thanks in advance. 


Iris

0
Avatar
Discard
Avatar
Evans E
Best Answer

The answers here: https://www.odoo.com/forum/help-1/mixed-content-request-from-an-insecure-resource-140344 helped me solve this issue.

1
Avatar
Discard
Avatar
Ajin A K
Best Answer

Dear Iris,

The "Mixed Content" error you're encountering in your Odoo website editor indicates that some resources are still being loaded over HTTP even though your site is configured for HTTPS. This can happen for a few reasons. Here are some steps you can take to fix the issue:

1. Check Nginx Configuration (if applicable):

  • If you're using Nginx as a reverse proxy for your Odoo container, ensure your configuration includes the following directives:
    • proxy_set_header X-Forwarded-Proto https;
    • This tells Odoo that the request originated from an HTTPS connection.
  • You can typically find your Nginx configuration file within the Docker volume mapped to the Nginx container. Look for sections related to proxying requests to Odoo.

2. Odoo Configuration:

  • In your Odoo configuration file (odoo.conf), make sure the web.base.url parameter is set to the HTTPS version of your website URL (e.g., https://www.yourdomain.com).
  • Additionally, consider enabling proxy_mode = True in the [options] section of odoo.conf. This helps Odoo handle headers correctly when behind a proxy server like Nginx.

3. Website Editor Iframe URL:

  • In some cases, the website editor iframe URL might still be using HTTP. You might need to modify the website.editor route in your reverse proxy configuration (e.g., Nginx) to add a middleware that updates the iframe URL to HTTPS.

4. Clear Browser Cache:

  • Sometimes, your browser might be holding onto cached resources loaded over HTTP. Try clearing your browser cache and reloading the Odoo website editor.

5. Cloudflare Settings:

  • Double-check your Cloudflare settings for the "Flexible SSL" option. While "Flexible" might serve content over HTTPS, it might not automatically force all resources to be loaded securely. Consider switching to a stricter SSL mode in Cloudflare if available (e.g., "Full" or "Full (Strict)").

Additional Resources:

  • Odoo forum discussion on similar issue: https://www.odoo.com/forum/help-1/mixed-content-request-from-an-insecure-resource-140344
  • Guide on preventing mixed content: https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content

By following these steps and checking your specific configuration details, you should be able to eliminate the mixed content error and ensure your Odoo website editor works seamlessly with HTTPS.

1
Avatar
Discard
Avatar
David Soden
Best Answer

I have the same issue on a fresh clean setup/install and with the 1st BLANK WEBSITE installed from template (which the please wait for the template to be installed never finishes loading because of the coding error internal to the program) so any MIXED errors are 100% in the system and nothing added by me the end user. I even opened a ticket that took several days to get a response. The response was, look for a response on the forum. (meaning you are likely to never get one from the company).

It's a coding issue the community developers and contributors have to fix https://github.com/odoo/. 

If you do get an answer from Odoo the company  - do NOT let them pass this particular issue off on a docker, or the docker network either. I spend my entire Saturday testing and QAing this platform for its limits and viability for my project (docker/source/windows installer). Its a great platform for the most part. 

This https/http MIXED error is the SAME on all CE install method versions. So the bottom line is the problem exists in the code (not installation/platform). 

I have resolved this to the following facts...

  • The issue only happens when trying to use the system as an administrator doing certain functions, like deploying the initial website or editing an existing website. there was another for eLearning module editing too but its the same website issue dependency underlying issue
    • @odoo team - this is key because https either works or it does not, and why this is a coding issue that I really wish someone would look into more closely.
  • As a public user viewing the site, the https not working issue goes away, and the site works fine and as expected https. 

take away is tunnel in using cloudflare, or twingate, and hit the site as admin when you need to perform backend admin functions by:

  • http://192.168.x.x / 172.16.x.x / 10.x.x.x
  • http://127.0.0.1
  • http://localhost
  • http://YourHostName

Its a pain in the %#$# but it's free 😁 so... or pay for the real macoy and get odoo.sh which has the best options for folks wanting backups/ higher performance and reliability plus ALM to experiment before pushing changes to production

I do not think there is any incentive to fix this.

1
Avatar
Discard
Avatar
Nguyen Anh Tuan
Best Answer

Add this to the nginx conf block it will work

proxy_redirect http:// https://;

or you can put your domain, in my case it will be:

proxy_redirect http://skyerp.net https://skyerp.net; 

it will work too

0
Avatar
Discard
Avatar
IotaWorx
Best Answer

Hi, guys,

I'm also using a similar setup: HAProxy + Odoo 17 Community running in a Docker container. I had the exact same issue. After spending time looking for a solution, I managed to do it this way:

I tried adding a header:

http-response set-header Content-Security-Policy upgrade-insecure-requests

However, that fixed it only in Firefox. Chrome and Edge still had the issue. Then, after looking at the requests the browser makes, I noticed that there is a Location header in the response which points to an http URL. So, I decided to try changing it with:

http-response replace-header Location ^http://my_domain(.+) https://my_domain\1​

Voila, now it works in all browsers. I don't know if this solution is a good one, but I don't have another option at the moment. I hope it will be useful for other people in my situation too.

0
Avatar
Discard
Michael Judd

Hi lotaWorx,

Just to confirm, I am using Docker + Odoo 18 running on in a docker with another docker running HAProxy. Using your suggestion, I added:

http-response replace-header Location ^http://(.+) https://\1

to the Backend and this solved the issue. I saw exactly the same issue with Firefox and separately Chrome & Edge.

Thanks for your post

Avatar
Deibys Paredes
Best Answer

Hi, Guys. I already made all the recommendations, but I'm still having the same problem. I don't know what to do if I made all changes. Can anyone help me.


I'm using:

- Docker

-Nginx

- Odoo 17 community version.

0
Avatar
Discard
Marcelo Zarza

I solved adding this line to the nginx site conf

`proxy_redirect http://mydomain https://mydomain;`

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Deploying odoo behind Amazon ELB without use of nginx
Docker LoadBalancer HTTPS AWS
Avatar
0
Dec 23
1909
Certificate SSL Solved
SSL
Avatar
Avatar
Avatar
Avatar
Avatar
5
Aug 25
30829
how to Install odoo 15 with docker? Solved
Docker
Avatar
Avatar
Avatar
Avatar
Avatar
4
Dec 23
47689
Discuss not realtime before Installed SSL
SSL
Avatar
Avatar
Avatar
2
Jun 23
3503
HTTPS urls in non SSL enviroment
HTTPS
Avatar
0
Feb 23
1987
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now