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
## 放在 server 區塊中,也可以獨立一個檔案讀取 | |
## ref: https://www.howtoforge.com/nginx-how-to-block-exploits-sql-injections-file-injections-spam-user-agents-etc | |
## Block SQL injections | |
set $block_sql_injections 0; | |
if ($query_string ~ "union.*select.*\(") { | |
set $block_sql_injections 1; | |
} | |
if ($query_string ~ "union.*all.*select.*") { | |
set $block_sql_injections 1; |