-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode-snippets.json
1 lines (1 loc) · 2.09 KB
/
code-snippets.json
1
{"generator":"Code Snippets v3.1.0","date_created":"2022-05-21 03:03","snippets":[{"name":"Security Ninja v.5.144","scope":"global","code":"\/\/Check if Windows Live Writer link is present in the header data.\nremove_action('wp_head', 'wlwmanifest_link');\n\n\/\/Check if full WordPress version info is revealed in page's meta data.\nfunction remove_version() {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\tadd_filter('the_generator', 'remove_version');\n\n\/\/Check if plugins\/themes file editor is enabled.\ndefine('DISALLOW_FILE_EDIT', true);\n\n\/\/Check if EditURI (XML-RPC) link is present in the header data.\nremove_action('wp_head', 'rsd_link');\nadd_filter('xmlrpc_enabled', '__return_false');\n\n\/\/Check if server response headers contain X-Content-Type-Options.\nheader('X-Content-Type-Options: nosniff');\n\n\/\/Check if server response headers contain X-Frame-Options.\nheader('X-Frame-Options: SAMEORIGIN');\n\n\/\/Check if server response headers contain X-XSS-Protection.\nheader('X-XSS-Protection: 1; mode=block');\n\n\/\/Check if server response headers contain Strict-Transport-Security.\nheader('Strict-Transport-Security: max-age=31536000;');\n\n\/\/Check if server response headers contain Referrer-Policy.\nheader('Referrer-Policy: same-origin');\n\n\/\/Check if server response headers contain Permissions-Policy.\nheader(\"Permissions-Policy: accelerometer 'none' ; ambient-light-sensor 'none' ; autoplay 'none' ; camera 'none' ; encrypted-media 'none' ; fullscreen 'none' ; geolocation 'none' ; gyroscope 'none' ; magnetometer 'none' ; microphone 'none' ; midi 'none' ; payment 'none' ; speaker 'none' ; sync-xhr 'none' ; usb 'none' ; notifications 'none' ; vibrate 'none' ; push 'none' ; vr 'none' \");\n\n\/\/Manually Disable the Application Passwords Feature \u81ea\u8a02\nadd_filter( 'wp_is_application_passwords_available', '__return_false' );\n\n\/\/Warning\n\/\/Check if the REST API links are shown in code\nremove_action('xmlrpc_rsd_apis', 'rest_output_rsd');\nremove_action('wp_head', 'rest_output_link_wp_head');\nremove_action('template_redirect', 'rest_output_link_header', 11, 0);","priority":"10"}]}