After long search this works for me with WP 4.4.2 to remove the X-pingback from the HTTP header:
/* Remove X-Pingback in the HTTP header */
add_filter(‘wp_headers’, function($headers) {
unset($headers[‘X-Pingback’]);
return $headers;
});
and this (solution of AITpro) works for me too to remove the link to Rest API in the HTTP header:
/* Remove link to Rest API in the HTTP header */
remove_action( ‘template_redirect’, ‘rest_output_link_header’, 11, 0 );