How to set host header to server chosen by nginx?

proxy_set_header Host xxx;

I want xxx to be the name of server chosen.

upstream myapp1 {
        server www.domainA.com:80;
        server www.domainB.com:80;
    }

so if domainA is chosen then xxx should be www.domainA.com:80..