Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Editing Website : Mixed Content http and https

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
DockerSSLHTTPS
6 Risposte
12906 Visualizzazioni
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
Abbandona
Avatar
Evans E
Risposta migliore

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
Abbandona
Avatar
Ajin A K
Risposta migliore

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
Abbandona
Avatar
David Soden
Risposta migliore

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
Abbandona
Avatar
Nguyen Anh Tuan
Risposta migliore

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
Abbandona
Avatar
IotaWorx
Risposta migliore

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
Abbandona
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
Risposta migliore

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

I solved adding this line to the nginx site conf

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

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Deploying odoo behind Amazon ELB without use of nginx
Docker LoadBalancer HTTPS AWS
Avatar
0
dic 23
1915
Certificate SSL Risolto
SSL
Avatar
Avatar
Avatar
Avatar
Avatar
5
ago 25
30833
how to Install odoo 15 with docker? Risolto
Docker
Avatar
Avatar
Avatar
Avatar
Avatar
4
dic 23
47693
Discuss not realtime before Installed SSL
SSL
Avatar
Avatar
Avatar
2
giu 23
3503
HTTPS urls in non SSL enviroment
HTTPS
Avatar
0
feb 23
1987
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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