When attempting to integrate the Odoo interface into my Flutter application, running on http://localhost:8000/, using an iframe, a specific error message appears in the browser: 'Refused to frame 'http://localhost:8069/' because an ancestor violates the following Content Security Policy directive: 'frame-ancestors 'self'.' How can I resolve this issue, considering that the Flutter application runs on http://localhost:8000/ and Odoo on http://localhost:8069/?
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
This question has been flagged
The issue stems from the Content Security Policy (CSP), by modifying both the web_login() and web_client() methods in the following path: C:\Program Files\Odoo 17.0.20240227\server\odoo\addons\web\controllers\home.py. This worked.
web_client()
#response.headers['X-Frame-Options'] = 'DENY'
web_login()
#response.headers['X-Frame-Options'] = 'SAMEORIGIN' #response.headers['Content-Security-Policy'] = "frame-ancestors 'self'"
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