views:

323

answers:

2

I want to pass a request to an upstream server. The original url is not password protected but the upstream server is. I need to inject a Basic auth username/password into the request but get errors when doing:

upstream supportbackend {
       server username:[email protected];
}

and

upstream supportbackend {
       server support.yadayada.com;
}

location /deleteuser {
    proxy_pass http://username:password@supportbackend;
}
+1  A: 

you need to add proxy_set_header Authorization "...."; where the .... is base64 of user:pass.

edogawaconan
A: 

Hi,

Currently i'm struggling to pass username and password in URL to publish password protected feeds and atom. Since my environment is a service oriented architecture, i'm using WCF service with REST. But i cant able to assign username and password intot the WCF url template. Pls if you have any idea or you experienced with these kind of issue, Please help me...

Vijay, Singapore

VIjay