Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Editing Website : Mixed Content http and https

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
DockerSSLHTTPS
6 Réponses
12888 Vues
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
Ignorer
Avatar
Evans E
Meilleure réponse

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
Ignorer
Avatar
Ajin A K
Meilleure réponse

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
Ignorer
Avatar
David Soden
Meilleure réponse

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
Ignorer
Avatar
Nguyen Anh Tuan
Meilleure réponse

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
Ignorer
Avatar
IotaWorx
Meilleure réponse

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
Ignorer
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
Meilleure réponse

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
Ignorer
Marcelo Zarza

I solved adding this line to the nginx site conf

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

Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Deploying odoo behind Amazon ELB without use of nginx
Docker LoadBalancer HTTPS AWS
Avatar
0
déc. 23
1905
Certificate SSL Résolu
SSL
Avatar
Avatar
Avatar
Avatar
Avatar
5
août 25
30828
how to Install odoo 15 with docker? Résolu
Docker
Avatar
Avatar
Avatar
Avatar
Avatar
4
déc. 23
47688
Discuss not realtime before Installed SSL
SSL
Avatar
Avatar
Avatar
2
juin 23
3502
HTTPS urls in non SSL enviroment
HTTPS
Avatar
0
févr. 23
1987
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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