hoxy icon indicating copy to clipboard operation
hoxy copied to clipboard

Enable basic proxy auth

Open behboud opened this issue 11 years ago • 5 comments
trafficstars

Our proxy uses basic auth. So I had to insert this line to enable. I'm not sure if this is the best place but works for me:

@@ -189,6 +189,7 @@ HTTP.createServer(function handleRequest(request, response) {
                                }

                                // this method makes node re-use client objects if needed
+                if(pEnvProxy.auth) reqInfo.headers['Proxy-Authorization'] = 'Basic ' + new Buffer(pEnvProxy.auth).toString(
                                var proxyReq = HTTP.request({
                                        method: reqInfo.method,

what do you think?

behboud avatar Feb 05 '14 07:02 behboud

Note: I'm working toward a 1.0 version, but there's a v0.x maintenance branch to support the previous version.

greim avatar Feb 13 '14 16:02 greim

Very useful - authentication could allow someone to securely share their website modifications with others

devinrhode2 avatar Aug 31 '15 22:08 devinrhode2

@behboud How are you doing this currently? Any pointers?

devinrhode2 avatar Aug 31 '15 22:08 devinrhode2

Definitely seems nice to have. Can someone point to a gist or code sample of this being implemented in node? I may chase it down myself eventually, but a lot on my plate at the moment.

greim avatar Sep 01 '15 04:09 greim

@devinrhode2 only used it with above modifications a year ago. Did not investigate any further...

behboud avatar Sep 08 '15 08:09 behboud