Change dns-prefetch to preconnect with correct protocol

I have this function in my functions.php file: add_filter( ‘wp_resource_hints’, function( $urls, $relation_type ) { if ( ‘dns-prefetch’ === $relation_type ) { $urls = []; } if ( ‘preconnect’ === $relation_type ) { $urls = wp_dependencies_unique_hosts(); } return $urls; }, 0, 2 ); It takes the URLs defined in wp_dependencies_unique_hosts() – which WordPress by default…