Skip to content

Commit 4dc578c

Browse files
committed
add support for path-style s3 access
1 parent 2cf2e98 commit 4dc578c

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

CHANGELOG.MD

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ All notable changes to this project will be documented in this file.
44

55
**Warning:** Features marked as *alpha* may change or be removed in a future release without notice. Use with caution.
66

7-
## [0.1.0] - 2025-04-30
7+
## [0.2.1] - 2025-06-08
88

99
### Added
1010

11-
- Created this project based on the command-line utilities from the [https://github.com/readium/go-toolkit](Go Toolkit)
11+
- Add `--s3-use-path-style` flag to enable broader support for S3-like services that use the deprecated path-style bucket access (especially useful in docker environments)
12+
13+
### Fixed
14+
15+
- The version output from the CLI was incorrect, consisting of the go-toolkit version. [It is now](https://github.com/readium/cli/pull/32) a combination of the CLI and go-toolkit version
1216

1317
## [0.2.0] - 2025-05-21
1418

@@ -19,4 +23,10 @@ All notable changes to this project will be documented in this file.
1923
### Changed
2024

2125
- Upgraded go-toolkit from v0.9.0 to v0.10.1
22-
- Default hashing algorithms for inspected images changed from SHA-256 + MD5 to just SHA-256
26+
- Default hashing algorithms for inspected images changed from SHA-256 + MD5 to just SHA-256
27+
28+
## [0.1.0] - 2025-04-30
29+
30+
### Added
31+
32+
- Created this project based on the command-line utilities from the [https://github.com/readium/go-toolkit](Go Toolkit)

internal/cli/serve.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var s3EndpointFlag string
3535
var s3RegionFlag string
3636
var s3AccessKeyFlag string
3737
var s3SecretKeyFlag string
38+
var s3UsePathStyleFlag bool
3839

3940
var httpAuthorizationFlag string
4041

@@ -120,6 +121,7 @@ to the internet except for testing/debugging purposes.`,
120121
o.BaseEndpoint = aws.String(s3EndpointFlag)
121122
}
122123
o.DisableLogOutputChecksumValidationSkipped = true // Non-AWS S3 tends not to support this and it causes logspam
124+
o.UsePathStyle = s3UsePathStyleFlag
123125
})
124126
} else {
125127
slog.Warn("S3 credentials retrieval failed, S3 support will be disabled", "error", err)
@@ -188,6 +190,7 @@ func init() {
188190
serveCmd.Flags().StringVar(&s3RegionFlag, "s3-region", "auto", "S3 region")
189191
serveCmd.Flags().StringVar(&s3AccessKeyFlag, "s3-access-key", "", "S3 access key")
190192
serveCmd.Flags().StringVar(&s3SecretKeyFlag, "s3-secret-key", "", "S3 secret key")
193+
serveCmd.Flags().BoolVar(&s3UsePathStyleFlag, "s3-use-path-style", false, "Use S3 path style buckets (default is to use virtual hosts)")
191194

192195
serveCmd.Flags().StringVar(&httpAuthorizationFlag, "http-authorization", "", "HTTP authorization header value (e.g. 'Bearer <token>' or 'Basic <base64-credentials>')")
193196

0 commit comments

Comments
 (0)