If statements are generally highly recommended against in Nginx config. I'd like to see some confirmation that the usage here is in line with how Nginx expects it to be used. Is the browser stuff a core Nginx module that they have documented should be used like this?