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
- 회계
- 재고 관리
- PoS
- Project
- MRP
신고된 질문입니다
1
회신
1140
화면
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'"