Skip to content

Commit

Permalink
Hot fix for cached images
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelGoerentz committed Jul 9, 2024
1 parent dcbd457 commit 5fd40f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
ref: main

- name: Set up and Build
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.22
id: go
Expand Down
2 changes: 1 addition & 1 deletion src/internal/imgcache/imagecache.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (ic *ImageCache) GetImageURL(url string) (string) {
if ic.caching {
filename := createFileNameFromURL(url, key)
path_to_file := ic.basePath + filename
url_to_file := ic.baseURL + "/cache/" + filename
url_to_file := ic.baseURL + "/images/" + filename

// Enqueue the Image for the download
ic.EnqueueURL(url, path_to_file)
Expand Down
2 changes: 1 addition & 1 deletion src/webserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ func Threadfin(w http.ResponseWriter, r *http.Request) {
func Images(w http.ResponseWriter, r *http.Request) {

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

err = checkForRestriction(w, r)
Expand Down

0 comments on commit 5fd40f6

Please sign in to comment.