Compare commits

..

No commits in common. "b2bc905e3cf8163cc8dc55f0c87941e2034a77b1" and "f30d4289f1aaa21d92f3aafbe43a1c34e3f05d6e" have entirely different histories.

3 changed files with 5 additions and 14 deletions

View File

@ -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
```

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)
}
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",