콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1140 화면

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/?

아바타
취소
작성자 베스트 답변

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'"  

아바타
취소