on-internet
← Community

How can i get HTTP Authorization header

Stack Overflow ·

I am developing a Chrome extension to capture the Authentication information. I want to get the HTTP Authorization Header. I tried the Chrome API webRequest.onSendHeaders, but it didn't work following is my code: /***************onsendHeaders*************/ chrome.webRequest.onSendHeaders.addListener(function(details) { console.log(details.url, details.requestHeaders); for(var i = 0; i < details.requestHeaders.length;i++) { var header = details.requestHeaders[i]; if(header.name.toLowerCase() == "authorization") { alert("AUTH!"); /*Never get alert when I login to websites*/ } } }, {"urls":["*://

Comments

Sign in or sign up to comment and upvote.

No comments yet.