Merge pull request #42 from kimdre/patch-1

block Wordpress XML-RPC endpoint
This commit is contained in:
cloudpanel-io
2024-12-05 13:46:17 +01:00
committed by GitHub
3 changed files with 15 additions and 3 deletions

View File

@@ -31,6 +31,10 @@ server {
deny all;
}
location = /xmlrpc.php {
deny all;
}
location ~/(wp-admin/|wp-login.php) {
#auth_basic "Restricted Area";
#auth_basic_user_file /home/site-user/.htpasswd;
@@ -117,4 +121,4 @@ server {
if (-f $request_filename) {
break;
}
}
}

View File

@@ -27,6 +27,10 @@ server {
deny all;
}
location = /xmlrpc.php {
deny all;
}
location ~/(wp-admin/|wp-login.php) {
#auth_basic "Restricted Area";
#auth_basic_user_file /home/site-user/.htpasswd;
@@ -110,4 +114,4 @@ server {
if (-f $request_filename) {
break;
}
}
}

View File

@@ -21,6 +21,10 @@ server {
allow all;
}
location = /xmlrpc.php {
deny all;
}
{{settings}}
try_files $uri $uri/ /index.php?$args;
@@ -58,4 +62,4 @@ server {
if (-f $request_filename) {
break;
}
}
}