Compare commits

..

No commits in common. "main" and "1.0.8" have entirely different histories.
main ... 1.0.8

3 changed files with 7 additions and 20 deletions

View File

@ -41,7 +41,7 @@ services:
ports:
- 3900:3900
- 3901:3901
- 3902:3902
- 3902:3903
- 3903:3903
webui:
@ -62,7 +62,7 @@ services:
Get the latest binary from the [release page](https://github.com/khairul169/garage-webui/releases/latest) according to your OS architecture. For example:
```sh
$ wget -O garage-webui https://github.com/khairul169/garage-webui/releases/download/1.0.9/garage-webui-v1.0.9-linux-amd64
$ wget -O garage-webui https://github.com/khairul169/garage-webui/releases/download/1.0.8/garage-webui-v1.0.8-linux-amd64
$ chmod +x garage-webui
$ sudo cp garage-webui /usr/local/bin
```
@ -136,11 +136,7 @@ admin_token = "YOUR_ADMIN_TOKEN_HERE"
metrics_token = "YOUR_METRICS_TOKEN_HERE"
```
However, if it fails to load, you can set `API_BASE_URL` & `API_ADMIN_KEY` environment variables instead.
### Environment Variables
Configurable envs:
However, if it fails to load, you can set these environment variables instead:
- `CONFIG_PATH`: Path to the Garage `config.toml` file. Defaults to `/etc/garage.toml`.
- `BASE_PATH`: Base path or prefix for Web UI.

View File

@ -146,20 +146,11 @@ func (b *Browse) GetOneObject(w http.ResponseWriter, r *http.Request) {
return
}
w.Header().Set("Content-Type", *object.ContentType)
w.Header().Set("Content-Length", strconv.FormatInt(*object.ContentLength, 10))
w.Header().Set("Cache-Control", "max-age=86400")
w.Header().Set("Last-Modified", object.LastModified.Format(time.RFC1123))
if object.ContentType != nil {
w.Header().Set("Content-Type", *object.ContentType)
} else {
w.Header().Set("Content-Type", "application/octet-stream")
}
if object.ContentLength != nil {
w.Header().Set("Content-Length", strconv.FormatInt(*object.ContentLength, 10))
}
if object.ETag != nil {
w.Header().Set("Etag", *object.ETag)
}
_, err = io.Copy(w, object.Body)

View File

@ -1,7 +1,7 @@
{
"name": "garage-webui",
"private": true,
"version": "1.0.9",
"version": "1.0.8",
"type": "module",
"scripts": {
"dev:client": "vite",