| @@ -24,8 +24,10 @@ | ||
| 24 | 24 | |
| 25 | 25 | new Api\Plugins(); |
| 26 | 26 | new Api\Themes(); |
| 27 | 27 | new Api\Updates(); |
| 28 | + new Api\Cache(); | |
| 29 | + new Api\Health(); | |
| 28 | 30 | } |
| 29 | 31 | |
| 30 | 32 | /** |
| 31 | 33 | * Check if API key is valid. |
| @@ -49,9 +51,9 @@ | ||
| 49 | 51 | if ( ! isset( $_SERVER['HTTP_AUTHORIZATION'] ) ) { |
| 50 | 52 | return false; |
| 51 | 53 | } |
| 52 | 54 | |
| 53 | - $auth_header = $_SERVER['HTTP_AUTHORIZATION']; | |
| 55 | + $auth_header = wp_unslash( $_SERVER['HTTP_AUTHORIZATION'] ); | |
| 54 | 56 | |
| 55 | 57 | if ( ! preg_match( '/Bearer\s(\S+)/', $auth_header, $matches ) ) { |
| 56 | 58 | return false; |
| 57 | 59 | } |