Skip to content

Commit 7292d53

Browse files
committed
feat(s3-proxy): expose x-amz-restore to JS for Glacier rehydration
The catalog's archived/restore detection (parseRestoreHeader, isEffectivelyArchived) reads the x-amz-restore HEAD response header to distinguish ongoing/expired restores from cold-archived objects. The s3-proxy was hard-coding the Access-Control-Expose-Headers list (and stripping S3's own) without including x-amz-restore, so browsers received the header but JS couldn't read it — rehydrated objects stayed showing 'Object Archived' instead of flipping to 'Restore in progress'. Add the header to the expose list.
1 parent 5c89375 commit 7292d53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

s3-proxy/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ http {
3838
add_header 'Access-Control-Allow-Methods' $http_access_control_request_method always;
3939
add_header 'Access-Control-Allow-Origin' '*' always;
4040
add_header 'Access-Control-Max-Age' '3000' always;
41-
add_header 'Access-Control-Expose-Headers' 'Content-Length, Content-Range, ETag, x-amz-meta-helium, x-amz-bucket-region, x-amz-delete-marker, x-amz-request-id, x-amz-version-id, x-amz-storage-class' always;
41+
add_header 'Access-Control-Expose-Headers' 'Content-Length, Content-Range, ETag, x-amz-meta-helium, x-amz-bucket-region, x-amz-delete-marker, x-amz-request-id, x-amz-version-id, x-amz-storage-class, x-amz-restore' always;
4242

4343
# Return success on OPTIONS.
4444
if ($request_method = 'OPTIONS') {

0 commit comments

Comments
 (0)