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
- Locate your odoo.conf file: This is typically found in /etc/odoo/.
- Edit the file: Open the file using a text editor.
- 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://).
- 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:
-
Locate your Nginx configuration file: This is usually found in /etc/nginx/sites-enabled/ or /etc/nginx/conf.d/.
-
Edit the file: Open the file with a text editor.
-
Locate the Odoo server block: Find the section of your Nginx configuration that defines how it interacts with your Odoo server.
-
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.