Handle basic http authentication with nginx in front of Jenkins

If having an nginx in front of Jenkins (or any other agent performing authentication) we may fall into problems if the user used in the front nginx proxy is not the same the agent behind it has. The problem is that the nginx in

 proxy_set_header   Authorization "";