Skip to content

fix(storage): enforce request origin, media response headers, and JSON content types - #856

Open
nidhiii-27 wants to merge 1 commit into
mainfrom
fix/storage-request-origin-and-media-headers
Open

nidhiii-27 wants to merge 1 commit into
mainfrom
fix/storage-request-origin-and-media-headers

Conversation

@nidhiii-27

Copy link
Copy Markdown

The testbench HTTP server now validates Origin and Sec-Fetch-Site headers in WSGI middleware, checks Content-Type headers on non-empty JSON POST requests, and sets sandboxed response headers on object media downloads. Standard client requests without browser origin headers, empty-body POST requests, and media uploads with text/plain remain unchanged, and object media responses use the object's Content-Type and Content-Disposition metadata. Added unit test coverage in tests/test_object.py and tests/test_testbench_root.py.

…N content types

The testbench HTTP server now validates Origin and Sec-Fetch-Site headers in WSGI middleware, checks Content-Type headers on non-empty JSON POST requests, and sets sandboxed response headers on object media downloads. Standard client requests without browser origin headers, empty-body POST requests, and media uploads with text/plain remain unchanged, and object media responses use the object's Content-Type and Content-Disposition metadata. Added unit test coverage in tests/test_object.py and tests/test_testbench_root.py.

[Generated-by: AI]
@nidhiii-27
nidhiii-27 marked this pull request as ready for review November 29, 2026 17:26
@nidhiii-27
nidhiii-27 requested a review from a team as a code owner November 29, 2026 17:26
@nidhiii-27
nidhiii-27 requested a review from cpriti-os November 29, 2026 17:26
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.

2 participants