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

SSL Website iframe send an HTTP request blocked by browser.

Subscribe

Get notified when there's activity on this post

This question has been flagged
5 Replies
4693 Views
Avatar
雍文

My Odoo17 Community Edition is an SSL site and when I go to the Website App, the iframe sends an HTTP request that is blocked by the browser. the page is not responding it keeps waiting. Can anyone answer what I should do? 

Chrome says:Mixed Content: The page at 'example.com/'. This request has been blocked; the content must be served over HTTPS.

Thank you!

0
Avatar
Discard
Avatar
JessWade
Best Answer

In case of our website we follow the these steps. Since your site uses HTTPS, all resources, including those within iframes, must also be served over HTTPS. To resolve this:

  1. Update the iframe URL: Ensure that the URL in the iframe is also using HTTPS. For example, change http://example.com to https://example.com.
  2. Check embedded content: Verify that all resources (images, scripts, etc.) within the iframe are being loaded over HTTPS.
  3. Review site settings: Ensure that your Odoo settings and any plugins or extensions used are configured to support HTTPS.

After making these adjustments, clear your browser cache and reload the page. This should resolve the issue with the blocked HTTP request.

0
Avatar
Discard
Avatar
Mariska Archielli
Best Answer

In case somebody is facing the same issue, I had the problem and for me this was what was causing this error:

proxy_pass_request_headers on;
proxy_set_headers Host $host;

These parameters were redirecting the https requests towards an http. I removed them from "location /" and added them in a separate bloc "location /api" and everything was working fine again.

0
Avatar
Discard
Avatar
Ajin A K
Best Answer

The issue you're facing is the iframe within the Odoo Website App preview using an HTTP link while your website is configured for HTTPS. This creates a mixed content error. Here are two potential solutions to address this:

Solution 1: Modifying Odoo Configuration

  1. Locate your odoo.conf file: This is typically found in /etc/odoo/.
  2. Edit the file: Open the file using a text editor.
  3. Set web.base.url: Look for the [options] section and ensure the web.base.url parameter is set to the full HTTPS URL of your website, including the protocol (https://).
  4. Check workers.force_https: If the option workers.force_https = True exists within the [options] section, make sure it's enabled. This instructs Odoo workers to always use HTTPS for communication.

Solution 2: Modifying Nginx Configuration (If Applicable):

If you're using Nginx as a reverse proxy, you can configure it to rewrite the iframe URL to use HTTPS:

  1. Locate your Nginx configuration file: This is usually found in /etc/nginx/sites-enabled/ or /etc/nginx/conf.d/.
  2. Edit the file: Open the file with a text editor.
  3. Locate the Odoo server block: Find the section of your Nginx configuration that defines how it interacts with your Odoo server.
  4. Add a rewrite rule: Inside the server block, add a rewrite rule to modify the iframe URL. Here's an example:

​ location / { # ... other Nginx configuration ... rewrite ^/(.*)$ https://$host/$1 permanent; } 

This rule rewrites all HTTP requests to their HTTPS counterparts, including those potentially generated by the Odoo iframe. 

  • Restart your web server (Nginx) and clear your browser cache after making any configuration changes to see the effects.
  • If you're unsure about modifying configuration files, consider seeking assistance from a system administrator or someone familiar with Odoo and Nginx.

By implementing one of these solutions, you should ensure that the iframe generated by the Website App preview also uses the HTTPS protocol, resolving the mixed content error and allowing the page to load correctly.


0
Avatar
Discard
雍文
Author

Thanks Reply! I have done all these settings, but to no avail. I feel that the links in the iframe are defined by JS, and the http request issued on local machine is blocked by the browser and does not reach the reverse proxy at all.

Avatar
雍文
Author Best Answer

Thanks Reply.

Both Nginx reverse proxy and SSL work fine. When the website App previews the homepage, it will start an iframe. The link of homepage initiated by this iframe is not an SSL link, but an HTTP link. The browser does not allow such access. So it will be blocked.  web.base.url has been set to HTTPS

0
Avatar
Discard
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

Please add the below line inside your nginx file . you need to add this inside the location

proxy_set_header X-Forwarded-Proto https;


example

location /longpolling {

                proxy_connect_timeout   3600;

                proxy_read_timeout      3600;

                proxy_send_timeout      3600;

                send_timeout            3600;

                proxy_set_header X-Forwarded-Proto https;

                proxy_pass http://127.0.0.1:8072;

        }


After adding it , save the file and restart nginx service


Hope it helps

0
Avatar
Discard
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
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