提交 a1f7d49d 编写于 作者: J Joshua Peek

Don't let a match go to waste

cc @aroben
上级 42ce6893
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
} }
// Avoid security warnings on getResponseHeader when not allowed by CORS // Avoid security warnings on getResponseHeader when not allowed by CORS
if (xhr.getAllResponseHeaders().match(/^X-Request-URL:/m)) { if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
return xhr.getResponseHeader('X-Request-URL') return xhr.getResponseHeader('X-Request-URL')
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册