The add_header directive will not generate a header if the value provided is an empty string See https://serverfault.com/a/1120170/51987