Looks legit, however it depends where in /etc/nginx/nginx/conf you added that.
I think putting it into the specific site config would be more appropraite - /etc/nginx/sites-available/your-site.conf.
Check this example for some ideas on where/how: http://stackoverflow.com/questions/18450310/nginx-add-header-not-working