Regarding "Proxy-Authorization" header in chrome.webRequest API

1,725 views
Skip to first unread message

Jigar

unread,
Mar 19, 2012, 6:48:57 AM3/19/12
to Chromium-extensions, myun...@googlemail.com
Hi,

In webRequest API : http://code.google.com/chrome/extensions/webRequest.html#event-onBeforeSendHeaders

I need to use "Proxy-Authorization" header in "onBeforeSendHeaders"
event.

but in documentation I see that this Header is currently not provided.
Is there any other way out ?

Can anyone say if this header will be supported in future or not ? if
yes, approximately when ?

Thanks,
Jigar Mehta.

Dominic Battre

unread,
Mar 19, 2012, 7:13:02 AM3/19/12
to Jigar, Chromium-extensions, myun...@googlemail.com
Hi Jigar,

Have you checked whether you get an onAuthRequired event?

Best regards,
Dominic


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Jigar

unread,
Mar 19, 2012, 8:48:41 AM3/19/12
to Chromium-extensions
Hello Mr. Dominic,

Thanks for your reply.

In our case its complicated to use "onAuthRequired" events. We are
having a kind off HTTP and HTTPS different proxy. For HTTPS proxy we
have to inject/pass "Proxy-Authorization" header value in headers of
each request. We nevere get this "onAuthRequired" events as server
always redirect client to the normal login page.

So is there any way to inject "Proxy-Authorization" header with its
value into HTTPS traffic ?

I will be great if you can help us out in this direction.


Thanks and Regards,
Jigar Mehta

On Mar 19, 4:13 pm, Dominic Battre <bat...@chromium.org> wrote:
> Hi Jigar,
>
> Have you checked whether you get an onAuthRequired event?
>
> Best regards,
> Dominic
>
>
>
>
>
>
>
> On Mon, Mar 19, 2012 at 11:48 AM, Jigar <jigar22.mehta...@gmail.com> wrote:
> > Hi,
>
> >     In webRequest API :
> >http://code.google.com/chrome/extensions/webRequest.html#event-onBefo...
>
> > I need to use "Proxy-Authorization" header in "onBeforeSendHeaders"
> > event.
>
> > but in documentation I see that this Header is currently not provided.
> > Is there any other way out ?
>
> > Can anyone say if this header will be supported in future or not ? if
> > yes, approximately when ?
>
> > Thanks,
> > Jigar Mehta.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-extensions+unsubscr...@chromium.org.

Dominic Battre

unread,
Mar 19, 2012, 11:43:50 AM3/19/12
to Jigar, Chromium-extensions
Well, in principle you can inject headers by modifying the details array as shown in the third example of http://code.google.com/chrome/extensions/trunk/webRequest.html#examples.

I don't know, though, whether these values get overridden. The point is that the authentication headers are set at a later point in time than onBeforeSendHeaders is called. Can I assume that you have tried that already and it did not work?

Best regards,
Dominic

To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.

Jigar

unread,
Mar 20, 2012, 5:43:47 AM3/20/12
to Chromium-extensions
Yes, I followed the same Method, injected headers by modifying the
details array
Here's a sample code from my work:

chrome.webRequest.onBeforeSendHeaders.addListener(
function(details) {

var test_Name = "test";
var proxyAuthName = "Proxy-Authorization";

var test_Value = localStorage.test_Value;
var proxyAuthValue = // retriving proxyAuthValue here..

details.requestHeaders.push({name: test_Name, value: test_Value});
details.requestHeaders.push({name: proxyAuthName, value:
proxyAuthValue}); // Facing problem here


return {requestHeaders: details.requestHeaders};
},
{urls: []},
['requestHeaders', 'blocking']);


Best Regards,
Jigar

On Mar 19, 8:43 pm, Dominic Battre <bat...@chromium.org> wrote:
> Well, in principle you can inject headers by modifying the details array as
> shown in the third example ofhttp://code.google.com/chrome/extensions/trunk/webRequest.html#examples.

Dominic Battre

unread,
Mar 20, 2012, 6:55:09 AM3/20/12
to Jigar, Chromium-extensions
I have filed bug http://crbug.com/119056.

Best regards,
Dominic

To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.

Jigar

unread,
Mar 20, 2012, 7:04:14 AM3/20/12
to Chromium-extensions
Thanks a lot for your help Mr. Dominic

Best Regards,
Jigar

On Mar 20, 3:55 pm, Dominic Battre <bat...@chromium.org> wrote:
> I have filed bughttp://crbug.com/119056.

Ankit Agarwal

unread,
Mar 18, 2016, 11:44:44 AM3/18/16
to Chromium-Extensions-Announce, myun...@googlemail.com
Hi, Did you get around this problem? I am facing similar issue where I need to dynamically change the Proxy-Authorization : Digest username = <user_name_value>. How do I get the Proxy-Authorization header to refresh its value dynamically? 
Reply all
Reply to author
Forward
0 new messages