File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,14 +35,3 @@ http {
3535 include /etc/nginx/conf.d/*.conf;
3636}
3737
38- # Define which paths to protect
39- location ~ ^/( flag/flag|admin|user /login) {
40- # Block bots on these paths only
41- if ( $http_user_agent ~ * ( bot|crawler|spider|scraper)) {
42- return 403 ;
43- }
44-
45- if ( $http_referer = "" ) {
46- return 403 ;
47- }
48- }
Original file line number Diff line number Diff line change @@ -86,6 +86,16 @@ server {
8686 fastcgi_pass ${NGINX_FPM_SERVICE};
8787 }
8888
89+ # Define which paths to protect
90+ location ~ ^/(flag/flag|admin|user/login) {
91+ # Block bots on these paths only
92+ if ($http_user_agent ~* (bot|crawler|spider|scraper)) {
93+ return 403;
94+ }
95+
96+ try_files $uri /index.php?$query_string;
97+ }
98+
8999 # Enforce clean URLs
90100 #
91101 # Removes index.php from urls like www.example.com/index.php/my-page --> www.example.com/my-page
You can’t perform that action at this time.
0 commit comments