include authorized_ip;

server {
  listen <%= node['nginx']['status']['port'] %>;
  server_name _;

  location /nginx_status {
    if ($authorized_ip = no) {
      return 404;
    }
    stub_status on;
    access_log off;
  }
}
