mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 05:32:02 +08:00
Merge branch 'master' of https://github.com/webp-sh/webp_server_go into webp-sh-master
This commit is contained in:
commit
4a589c1291
@ -14,7 +14,14 @@ RUN cd /build && sed -i "s|.\/pics|${IMG_PATH}|g" config.json \
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt update && apt install --no-install-recommends libvips ca-certificates -y && rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/apt/archives/*
|
||||
RUN apt update && apt install --no-install-recommends libvips ca-certificates curl -y && rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/apt/archives/*
|
||||
|
||||
# Download and install libam with correct arch
|
||||
# http://ftp.us.debian.org/debian/pool/main/a/aom/libaom3_3.11.0~rc1-1_amd64.deb
|
||||
# http://ftp.us.debian.org/debian/pool/main/a/aom/libaom3_3.11.0~rc1-1_arm64.deb
|
||||
RUN curl -O http://ftp.us.debian.org/debian/pool/main/a/aom/libaom3_3.11.0~rc1-1_$(dpkg --print-architecture).deb && \
|
||||
dpkg -i libaom3_3.11.0~rc1-1_$(dpkg --print-architecture).deb && \
|
||||
rm libaom3_3.11.0~rc1-1_$(dpkg --print-architecture).deb
|
||||
|
||||
COPY --from=builder /build/webp-server /usr/bin/webp-server
|
||||
COPY --from=builder /build/config.json /etc/config.json
|
||||
|
@ -142,7 +142,7 @@ func GuessSupportedFormat(header *fasthttp.RequestHeader) map[string]bool {
|
||||
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", "iPhone OS 18", "CPU OS 18"}
|
||||
for _, version := range supportedWebPs {
|
||||
if strings.Contains(ua, version) {
|
||||
supported["webp"] = true
|
||||
@ -150,7 +150,7 @@ func GuessSupportedFormat(header *fasthttp.RequestHeader) map[string]bool {
|
||||
}
|
||||
}
|
||||
|
||||
supportedAVIFs := []string{"iPhone OS 16", "CPU OS 16", "iPhone OS 17", "CPU OS 17"}
|
||||
supportedAVIFs := []string{"iPhone OS 16", "CPU OS 16", "iPhone OS 17", "CPU OS 17", "iPhone OS 18", "CPU OS 18"}
|
||||
for _, version := range supportedAVIFs {
|
||||
if strings.Contains(ua, version) {
|
||||
supported["avif"] = true
|
||||
@ -161,7 +161,7 @@ func GuessSupportedFormat(header *fasthttp.RequestHeader) map[string]bool {
|
||||
// Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15 <- iPad
|
||||
// Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15 <- Mac
|
||||
// Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Mobile/15E148 Safari/604.1 <- iPhone @ Safari
|
||||
supportedJXLs := []string{"iPhone OS 17", "CPU OS 17", "Version/17"}
|
||||
supportedJXLs := []string{"iPhone OS 17", "CPU OS 17", "Version/17", "iPhone OS 18", "CPU OS 18", "Version/18"}
|
||||
if strings.Contains(ua, "iPhone") || strings.Contains(ua, "Macintosh") {
|
||||
for _, version := range supportedJXLs {
|
||||
if strings.Contains(ua, version) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user