Skip to content

Commit e0be72a

Browse files
pierre-bclaude
andcommitted
Fix CORS headers for AWS SDK v3 compatibility
- Use wildcard (*) for Access-Control-Allow-Headers and Access-Control-Expose-Headers - Add comprehensive CORS integration tests - Improve test coverage to 86.3% - Add CHANGELOG.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2272a6a commit e0be72a

File tree

6 files changed

+912
-2
lines changed

6 files changed

+912
-2
lines changed

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [v1.1] - 2025-11-28
9+
10+
### Fixed
11+
- CORS headers now use wildcards (`*`) for `Access-Control-Allow-Headers` and `Access-Control-Expose-Headers` to support AWS SDK v3 and other S3 clients that send custom headers like `amz-sdk-invocation-id` and `amz-sdk-request`
12+
13+
### Added
14+
- Comprehensive CORS integration tests covering:
15+
- Preflight (OPTIONS) requests
16+
- Simple GET/HEAD requests with Origin header
17+
- Wildcard origin support
18+
- Error response CORS headers
19+
- S3-specific header handling
20+
- DELETE preflight requests
21+
- Max-age caching verification
22+
23+
### Improved
24+
- Test coverage increased to 86.3% overall
25+
- Server: 85.3%
26+
- Storage: 77.1%
27+
- Auth: 93.7%
28+
- Config: 100%
29+
30+
## [v1.0] - 2025-11-28
31+
32+
### Added
33+
- Initial release of SelfhostS3
34+
- S3-compatible object storage server
35+
- AWS Signature V4 authentication
36+
- Public file access with configurable prefix (default: `public/`)
37+
- Cache-Control headers for public files
38+
- Download parameter (`?download=1`) for Content-Disposition header
39+
- CORS support with configurable origins
40+
- Health check endpoint (`/health`)
41+
- Docker support with multi-platform builds (amd64, arm64)
42+
- GitHub Actions CI/CD workflows
43+
- Comprehensive unit and integration tests
44+
45+
### Features
46+
- **Storage Operations**: PUT, GET, HEAD, DELETE objects
47+
- **Listing**: ListObjectsV2 with prefix filtering
48+
- **Content Types**: Automatic MIME type detection from file extension
49+
- **Security**: Path traversal protection, AWS Sig V4 authentication
50+
- **Public Access**: Unauthenticated GET/HEAD for public prefix
51+
- **Configuration**: Environment variable based configuration

codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 70%
6+
threshold: 10%
7+
patch: off
8+
range: '60...80'
9+
# Exclude mock files from coverage calculation
10+
ignore:
11+
- '**/cmd/**'
12+
- '**/integration/**'

0 commit comments

Comments
 (0)