Explorar o código

Fixing browser header is null bug

Toby Chui %!s(int64=3) %!d(string=hai) anos
pai
achega
bce17313f7
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      web/Browser/index.html

+ 7 - 1
web/Browser/index.html

@@ -422,7 +422,13 @@
 					url: url
 				}, function(data){
 					let xFrameOptions = JSON.parse(data);
-					let header = xFrameOptions.header.toLowerCase().trim();
+					let header = "";
+					if (xFrameOptions.header == null){
+						xFrameOptions.header = "deny";
+					}else{
+						header = xFrameOptions.header.toLowerCase().trim();
+					}
+					
 					let location = xFrameOptions.location;
 					if (header == "null"){
 						//Site not exists