13.09.2016, 19:23
Möchte eine Seite im frame aufrufen:
Dabei habe ich:
Komischerweise ging es vorher mit header_remove("X-Frame-Options"); , sollte ich die Variante mit X-Frame-Options: ALLOW-FROM verwenden?
Im Firefox funktioniert es, im Opera gibt es diesen Security error, mh?
domainundhomepagespeicher.webfan.de/cdn/application/webfan/app.html#/com.webfan.my/browse/http:~2F~2Ffrdl.webfan.de~2Fmy-apps.297.html
Zitat:XMLHttpRequest cannot load api.webfan.de/api-d/4/js-api/library.js?plugin=alertify. The 'Access-Control-Allow-Origin' header has a value 'http://domainundhomepagespeicher.webfan.de' that is not equal to the supplied origin. Origin 'frdl.webfan.de' is therefore not allowed access.
my-apps.297.html:1 XMLHttpRequest cannot load api.webfan.de/api-d/4/js-api/library.js?plugin=hash. The 'Access-Control-Allow-Origin' header has a value ' domainundhomepagespeicher.webfan.de' that is not equal to the supplied origin. Origin 'frdl.webfan.de' is therefore not allowed access.
Dabei habe ich:
PHP-Code:
public static function originHeaders(){
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Origin: ".((isset($_SERVER['HTTP_ORIGIN'])) ? $_SERVER['HTTP_ORIGIN'] : "*"));
header("Access-Control-Allow-Headers: X-Requested-With");
// NUR EINSCHRÄNKUNG * GEHT NICH ! header('X-Frame-Options: ALLOW-FROM *'); */
//header('X-Frame-Options: ALLOW-FROM http://shell.frdl.de');
//header_remove("X-Frame-Options");
if(isset($_SERVER['HTTP_ORIGIN'])){
header('X-Frame-Options: ALLOW-FROM '.$_SERVER['HTTP_ORIGIN']);
}else{
header_remove("X-Frame-Options");
}
header_remove("X-Frame-Options");
header("Vary: Origin");
}
Im Firefox funktioniert es, im Opera gibt es diesen Security error, mh?
domainundhomepagespeicher.webfan.de/cdn/application/webfan/app.html#/com.webfan.my/browse/http:~2F~2Ffrdl.webfan.de~2Fmy-apps.297.html