mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42:02 +08:00
修复每次都回源, 把默认etag改为静态值
This commit is contained in:
parent
b5fb5b84a0
commit
d976d8f7cb
@ -7,7 +7,6 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
"webp_server_go/config"
|
"webp_server_go/config"
|
||||||
"webp_server_go/helper"
|
"webp_server_go/helper"
|
||||||
|
|
||||||
@ -152,6 +151,7 @@ func pingURL(url string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func generateFallbackIdentifier(url string) string {
|
func generateFallbackIdentifier(url string) string {
|
||||||
// 使用 URL 和当前时间生成一个唯一标识符
|
// 使用 URL 的哈希值作为稳定的标识符
|
||||||
return "fallback-" + helper.HashString(url + time.Now().String())
|
return "fallback-" + helper.HashString(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user