Last active
June 14, 2022 09:48
-
-
Save ersin-demirtas/cbd1f722c783b91e86bd80af079d0bf8 to your computer and use it in GitHub Desktop.
Secure - NGINX allow only get request method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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