Skip to content

Commit 5fd40f6

Browse files
Hot fix for cached images
1 parent dcbd457 commit 5fd40f6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
ref: main
1818

1919
- name: Set up and Build
20-
uses: actions/setup-go@v4
20+
uses: actions/setup-go@v5
2121
with:
2222
go-version: 1.22
2323
id: go

src/internal/imgcache/imagecache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (ic *ImageCache) GetImageURL(url string) (string) {
6262
if ic.caching {
6363
filename := createFileNameFromURL(url, key)
6464
path_to_file := ic.basePath + filename
65-
url_to_file := ic.baseURL + "/cache/" + filename
65+
url_to_file := ic.baseURL + "/images/" + filename
6666

6767
// Enqueue the Image for the download
6868
ic.EnqueueURL(url, path_to_file)

src/webserver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ func Threadfin(w http.ResponseWriter, r *http.Request) {
400400
func Images(w http.ResponseWriter, r *http.Request) {
401401

402402
var err error
403-
var path = strings.TrimPrefix(r.URL.Path, "/")
403+
var path = strings.TrimPrefix(r.URL.Path, "/images/")
404404
var filePath = System.Folder.ImagesCache + getFilenameFromPath(path)
405405

406406
err = checkForRestriction(w, r)

0 commit comments

Comments
 (0)