generated from bisco/codex-bootstrap
feat: add wordpress site variant
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
client_max_body_size 16m;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For __X_FORWARDED_FOR__;
|
||||
proxy_set_header X-Forwarded-Proto __X_FORWARDED_PROTO__;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header Connection "";
|
||||
proxy_read_timeout 60s;
|
||||
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header Permissions-Policy "camera=(), geolocation=(), microphone=(), payment=(), usb=()" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
|
||||
location = /xmlrpc.php {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location = /wp-login.php {
|
||||
limit_req zone=login burst=5 nodelay;
|
||||
proxy_pass http://wordpress_backend;
|
||||
}
|
||||
|
||||
location ^~ /wp-admin/ {
|
||||
limit_req zone=site burst=60 nodelay;
|
||||
proxy_pass http://wordpress_backend;
|
||||
}
|
||||
|
||||
location ~* ^/(?:wp-content/uploads|wp-content/files)/.*\.php$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ~ (^|/)\. {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location = /wp-config.php {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
limit_req zone=site burst=60 nodelay;
|
||||
add_header Content-Security-Policy "default-src 'self'; base-uri 'self'; object-src 'none'; frame-ancestors 'self'; form-action 'self'; img-src 'self' data: https:; font-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; connect-src 'self'" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header Permissions-Policy "camera=(), geolocation=(), microphone=(), payment=(), usb=()" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
proxy_pass http://wordpress_backend;
|
||||
}
|
||||
Reference in New Issue
Block a user