2017-06-21 49 views
1

我有一个SSRS报表服务器的基本身份验证,以避免从Web服务器击中SSRS报表服务器时登录弹出窗口。我在url本身发送凭据。这是谷歌铬58,但现在它更新为铬59.现在我无法在浏览器URL中发送凭据。在URL中不支持发送url中的凭据chrome 59

https://gooduser:[email protected]

用户名:gooduser 密码:secredpassword

在此请您帮助!

+1

显然不再支持。 https://www.chromestatus.com/feature/5669008342777856 – niktrs

+0

简而言之:谷歌破坏了它,似乎并不想解决它。可能以“改善安全性”或类似的借口为借口。有没有可以游说的地方来消除这种精神错乱? – Ray

回答

0

我用chrome扩展解决了同样的问题。

在扩展background.js

chrome.extension.onMessage.addListener( function(request, sender, sendResponse){ 
    chrome.webRequest.onAuthRequired.addListener(
     function(details, callbackFn) { 
      console.log("onAuthRequired!", details, callbackFn); 
      callbackFn({ 
       authCredentials: {username: request.username, password: request.password } 
      }); 
     }, 
     {urls: request.url + "/*"]}, 
     ['asyncBlocking'] 
    ); 
}); 

在扩展contentscript.js

window.addEventListener("message", function(event) { 
    if (event.type == "BASIC_AUTH") { 
    chrome.runtime.sendMessage( 
      event.data, 
      event.data.sender, 
      function (response) {}  
     ); 
    } 
}); 

在HTML的JavaScript

window.postMessage({ type: "BASIC_AUTH", url:"www.mydomain.com", username:"myusername", password:"mypassword" }, "*"); 

如果你喜欢从Chrome网上应用店使用的扩展名如:MultiPass for HTTP basic authentication