Skip to content

fix: expose x-amz-storage-class in CORS response headers#2159

Open
benmcclelland wants to merge 1 commit into
mainfrom
ben/webui-storageclass
Open

fix: expose x-amz-storage-class in CORS response headers#2159
benmcclelland wants to merge 1 commit into
mainfrom
ben/webui-storageclass

Conversation

@benmcclelland
Copy link
Copy Markdown
Member

The object info modal in the WebUI was always displaying STANDARD as the storage class regardless of the actual value. The root cause is a browser CORS restriction: when the WebUI makes a cross-origin HEAD request to the S3 endpoint, the browser silently drops any response header not listed in Access-Control-Expose-Headers, causing response.headers.get('x-amz-storage-class') to return null and the UI to fall back to the hardcoded STANDARD default.

Adding x-amz-storage-class to the default set of exposed headers ensures the browser makes it available to JavaScript, allowing storage classes such as GLACIER to be correctly reflected in the UI.

The object info modal in the WebUI was always displaying STANDARD as the
storage class regardless of the actual value. The root cause is a browser
CORS restriction: when the WebUI makes a cross-origin HEAD request to the
S3 endpoint, the browser silently drops any response header not listed in
Access-Control-Expose-Headers, causing response.headers.get('x-amz-storage-class')
to return null and the UI to fall back to the hardcoded STANDARD default.

Adding x-amz-storage-class to the default set of exposed headers ensures
the browser makes it available to JavaScript, allowing storage classes such
as GLACIER to be correctly reflected in the UI.
@benmcclelland benmcclelland force-pushed the ben/webui-storageclass branch from a624a73 to 0e165ed Compare May 30, 2026 03:18
@benmcclelland benmcclelland requested a review from niksis02 May 30, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant