2017-09-06 1 views
0

iframe을 사용하여 캘린더를 표시하고 있습니다. 그러나 나는 계속 다음과 같은 것을 얻는다; 프레임에 표시하지 않음

는 조상는 다음과 같은 콘텐츠 보안 정책 지침을 위반 때문에 프레임에 ' https://cal.mixmax.com/user1'을 표시 거부 : "프레임의 조상 '자기' https://mail.google.com https://inbox.google.com https : //로 .force.com은 https :// .mixmax.com "

나는 Content-Security-Policy에 대한 메타를 다음과 같이 시도했지만 운이 없다.

<meta http-equiv="Content-Security-Policy" 
     content="frame-ancestors 'self' 
     https://mail.google.com 
     https://inbox.google.com 
     https://*.force.com 
     https://*.mixmax.com"> 

어떻게 극복 할 수 있습니까?

답변

2

문제는 사용자 측에서 잘못 설정 한 것이 아니라 Mixmax 측의 CSP 지시문에 나와 있습니다. 그들은 자신의 페이지에 다음 지시문을 가지고 : 당신이 나열된 도메인의에서하지 않는 한

content-security-policy: frame-ancestors 'self' https://mail.google.com https://inbox.google.com https://*.force.com https://*.mixmax.com;; frame-src https://*.stripe.com https://*.facebook.com https://*.mixmax.com

그래서 당신은 그것을 프레임 수 없습니다.

이를 극복하는 한 가지 방법은 사이트에서 프록시를 생성하고 클라이언트 대신 MixMax에 액세스하여 CSP가 클라이언트에서만 시행되므로 프레임에 데이터를 전송하는 것입니다.