Skip to content

Instantly share code, notes, and snippets.

@ersin-demirtas
Last active June 14, 2022 09:48
Show Gist options
  • Save ersin-demirtas/cbd1f722c783b91e86bd80af079d0bf8 to your computer and use it in GitHub Desktop.
Save ersin-demirtas/cbd1f722c783b91e86bd80af079d0bf8 to your computer and use it in GitHub Desktop.
Secure - NGINX allow only get request method
# Open your /etc/nginx/sites-enabled/sitename.com file place limit_except directive
# More info available at http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_except
location / {
limit_except GET {
deny all;
}
try_files $uri $uri/ =404;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment