Created
July 21, 2017 20:10
-
-
Save DreamerKlim/255805fc100ec909d4a4d6a264753fa7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* -------------------------------------------------------------------------- | |
| * Удаляем опасные методы работы XML-RPC Pingback | |
| * -------------------------------------------------------------------------- */ | |
| add_filter( 'xmlrpc_methods', 'sheensay_block_xmlrpc_attacks' ); | |
| function sheensay_block_xmlrpc_attacks( $methods ) { | |
| unset( $methods['pingback.ping'] ); | |
| unset( $methods['pingback.extensions.getPingbacks'] ); | |
| return $methods; | |
| } | |
| add_filter( 'wp_headers', 'sheensay_remove_x_pingback_header' ); | |
| function sheensay_remove_x_pingback_header( $headers ) { | |
| unset( $headers['X-Pingback'] ); | |
| return $headers; | |
| } | |
| /* -------------------------------------------------------------------------- | |
| * Удаляем опасные методы работы XML-RPC Pingback | |
| * -------------------------------------------------------------------------- */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment