File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ S3_SECRET_KEY=your-secret-key-here
1414# S3 domain for Caddy HTTPS (used in docker-compose.cloudflare.yml)
1515S3_DOMAIN = s3.yourdomain.com
1616
17+ # Public S3 endpoint URL for display in browser (e.g., https://s3.yourdomain.com:8443)
18+ S3_PUBLIC_ENDPOINT = https://s3.yourdomain.com:8443
19+
1720# Cloudflare API token for DNS challenge (Zone:DNS:Edit permission)
1821# Create at: https://dash.cloudflare.com/profile/api-tokens
1922CLOUDFLARE_API_TOKEN = your-cloudflare-api-token
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ class Settings(BaseSettings):
1313
1414 # S3 Gateway settings
1515 s3_endpoint : str = "http://s3-gateway:9000"
16+ s3_public_endpoint : str = "" # Public S3 endpoint URL for display (e.g., https://s3.example.com:8443)
1617 s3_access_key : str = ""
1718 s3_secret_key : str = ""
1819
Original file line number Diff line number Diff line change @@ -271,6 +271,7 @@ async def object_detail_page(
271271 username : str = Depends (get_current_user ),
272272 s3_client : S3Client = Depends (get_s3_client ),
273273 version_mapper : VersionMapper = Depends (get_version_mapper ),
274+ settings : Settings = Depends (get_settings ),
274275):
275276 """Object detail page with version history."""
276277 try :
@@ -301,6 +302,7 @@ async def object_detail_page(
301302 "versions" : [v .to_dict () for v in versions ],
302303 "breadcrumbs" : breadcrumbs ,
303304 "username" : username ,
305+ "s3_public_endpoint" : settings .s3_public_endpoint ,
304306 },
305307 )
306308 except HTTPException :
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ <h1 class="card-title">📄 {{ key.split('/')[-1] }}</h1>
2323 < div class ="metadata-grid ">
2424 < div class ="metadata-item ">
2525 < div class ="metadata-label "> S3 URI</ div >
26- < div class ="metadata-value "> < code > s3://{{ bucket }}/{{ key }}</ code > </ div >
26+ < div class ="metadata-value "> < code > {% if s3_public_endpoint %}--endpoint-url={{ s3_public_endpoint }} {% endif %} s3://{{ bucket }}/{{ key }}</ code > </ div >
2727 </ div >
2828 < div class ="metadata-item ">
2929 < div class ="metadata-label "> Size</ div >
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ services:
6060 container_name : rsync-s3-browser
6161 environment :
6262 - S3_ENDPOINT=http://s3-gateway:9000
63+ - S3_PUBLIC_ENDPOINT=${S3_PUBLIC_ENDPOINT:-}
6364 - S3_ACCESS_KEY=${S3_ACCESS_KEY}
6465 - S3_SECRET_KEY=${S3_SECRET_KEY}
6566 - RSYNC_HOST=${RSYNC_HOST}
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ services:
5252 container_name : rsync-s3-browser
5353 environment :
5454 - S3_ENDPOINT=http://s3-gateway:9000
55+ - S3_PUBLIC_ENDPOINT=${S3_PUBLIC_ENDPOINT:-}
5556 - S3_ACCESS_KEY=${S3_ACCESS_KEY}
5657 - S3_SECRET_KEY=${S3_SECRET_KEY}
5758 - RSYNC_HOST=${RSYNC_HOST}
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ services:
3030 container_name : rsync-s3-browser
3131 environment :
3232 - S3_ENDPOINT=http://s3-gateway:9000
33+ - S3_PUBLIC_ENDPOINT=${S3_PUBLIC_ENDPOINT:-}
3334 - S3_ACCESS_KEY=${S3_ACCESS_KEY}
3435 - S3_SECRET_KEY=${S3_SECRET_KEY}
3536 - RSYNC_HOST=${RSYNC_HOST}
You can’t perform that action at this time.
0 commit comments