Skip to content

Commit f3ae6d7

Browse files
committed
URLEncode spaces in CloudFront invalidation requests.
1 parent a0c9000 commit f3ae6d7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Deployer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public function upload_files( string $processed_site_path ) : void {
117117
if ( 0 === substr_compare( $cf_key, '/index.html', -11 ) ) {
118118
$cf_key = substr( $cf_key, 0, -10 );
119119
}
120+
$cf_key = str_replace( ' ', '%20', $cf_key );
120121
array_push( $cf_stale_paths, $cf_key );
121122
}
122123
}
@@ -165,6 +166,7 @@ public function upload_files( string $processed_site_path ) : void {
165166
if ( 0 === substr_compare( $cf_key, '/index.html', -11 ) ) {
166167
$cf_key = substr( $cf_key, 0, -10 );
167168
}
169+
$cf_key = str_replace( ' ', '%20', $cf_key );
168170
array_push( $cf_stale_paths, $cf_key );
169171
}
170172
}

0 commit comments

Comments
 (0)