mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42:02 +08:00
Allow jxl based on Accept header (#326)
This commit is contained in:
parent
8c15bf3a03
commit
b5842b264c
@ -49,7 +49,7 @@ var (
|
|||||||
ProxyMode bool
|
ProxyMode bool
|
||||||
Prefetch bool
|
Prefetch bool
|
||||||
Config = NewWebPConfig()
|
Config = NewWebPConfig()
|
||||||
Version = "0.11.0"
|
Version = "0.11.1"
|
||||||
WriteLock = cache.New(5*time.Minute, 10*time.Minute)
|
WriteLock = cache.New(5*time.Minute, 10*time.Minute)
|
||||||
ConvertLock = cache.New(5*time.Minute, 10*time.Minute)
|
ConvertLock = cache.New(5*time.Minute, 10*time.Minute)
|
||||||
RemoteRaw = "./remote-raw"
|
RemoteRaw = "./remote-raw"
|
||||||
|
@ -140,6 +140,9 @@ func GuessSupportedFormat(header *fasthttp.RequestHeader) map[string]bool {
|
|||||||
if strings.Contains(accept, "image/avif") {
|
if strings.Contains(accept, "image/avif") {
|
||||||
supported["avif"] = true
|
supported["avif"] = true
|
||||||
}
|
}
|
||||||
|
if strings.Contains(accept, "image/jxl") {
|
||||||
|
supported["jxl"] = true
|
||||||
|
}
|
||||||
|
|
||||||
supportedWebPs := []string{"iPhone OS 14", "CPU OS 14", "iPhone OS 15", "CPU OS 15", "iPhone OS 16", "CPU OS 16", "iPhone OS 17", "CPU OS 17"}
|
supportedWebPs := []string{"iPhone OS 14", "CPU OS 14", "iPhone OS 15", "CPU OS 15", "iPhone OS 16", "CPU OS 16", "iPhone OS 17", "CPU OS 17"}
|
||||||
for _, version := range supportedWebPs {
|
for _, version := range supportedWebPs {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user