Skip to content

Commit afacb9e

Browse files
Update media.php
Co-authored-by: Weston Ruter <[email protected]>
1 parent e26a9c3 commit afacb9e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/wp-includes/media.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6372,7 +6372,8 @@ function wp_get_image_editor_output_format( $filename, $mime_type ) {
63726372
*/
63736373
function wp_is_client_side_media_processing_enabled(): bool {
63746374
// This is due to SharedArrayBuffer requiring a secure context.
6375-
$enabled = ( is_ssl() || 'localhost' === strtok( $_SERVER['HTTP_HOST'] ?? '', ':' ) );
6375+
$host = strtolower( (string) strtok( $_SERVER['HTTP_HOST'] ?? '', ':' ) );
6376+
$enabled = ( is_ssl() || 'localhost' === $host || str_ends_with( $host, '.localhost' ) );
63766377

63776378
/**
63786379
* Filters whether client-side media processing is enabled.

0 commit comments

Comments
 (0)