350 Commits

Author SHA1 Message Date
0b494e08ac 尝试修复无限重定向 2024-09-29 15:04:43 +08:00
68108a3946 修复了远程请求错误,优化了日志警告信息,并改进了生成默认etag的逻辑。 2024-09-29 12:25:29 +08:00
d976d8f7cb 修复每次都回源, 把默认etag改为静态值 2024-09-29 03:21:26 +08:00
b5fb5b84a0 fix 2024-09-29 02:18:49 +08:00
08be6ef926 fix 2024-09-29 02:13:10 +08:00
85362aad22 修复 2024-09-29 01:39:46 +08:00
214d189e24 尝试修复 2024-09-29 01:37:44 +08:00
77801f29fa 尝试修复 2024-09-29 01:08:37 +08:00
34092a41b0 非图片文件会302重定向到原始链接 2024-09-29 00:47:33 +08:00
9629b19b9a 导入time 2024-09-29 00:13:41 +08:00
e7c6fe9851 这个修改版本的 pingURL 函数有以下改进:
如果无法获取 ETag,尝试使用 Last-Modified 头部信息。
如果 ETag 和 Last-Modified 都不可用,使用一个基于 URL 和当前时间的回退标识符。
在出现错误或意外状态码时,也使用回退标识符。
增加了更详细的日志记录,有助于问题诊断。
2024-09-29 00:09:18 +08:00
a491e9cf49 Remove 'tags' from release workflow (#354) 2024-09-05 16:01:21 +08:00
a48318803e Update README with new Docker image 2024-09-05 16:00:31 +08:00
034e7e3834 Bump github.com/valyala/fasthttp from 1.52.0 to 1.55.0 (#339) 2024-09-05 15:59:32 +08:00
Nova Kwok
89aea97310
Bump to Go 1.23 (#353)
* Bump to Go 1.23

* Install docker-compose
2024-08-16 23:43:39 +08:00
dependabot[bot]
d400f52e15
Bump github.com/schollz/progressbar/v3 from 3.14.5 to 3.14.6 (#350)
Bumps [github.com/schollz/progressbar/v3](https://github.com/schollz/progressbar) from 3.14.5 to 3.14.6.
- [Release notes](https://github.com/schollz/progressbar/releases)
- [Commits](https://github.com/schollz/progressbar/compare/v3.14.5...v3.14.6)

---
updated-dependencies:
- dependency-name: github.com/schollz/progressbar/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 10:20:18 +08:00
dependabot[bot]
80d6a04509
Bump github.com/schollz/progressbar/v3 from 3.14.4 to 3.14.5 (#348)
Bumps [github.com/schollz/progressbar/v3](https://github.com/schollz/progressbar) from 3.14.4 to 3.14.5.
- [Release notes](https://github.com/schollz/progressbar/releases)
- [Commits](https://github.com/schollz/progressbar/compare/v3.14.4...v3.14.5)

---
updated-dependencies:
- dependency-name: github.com/schollz/progressbar/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 05:25:11 +08:00
dependabot[bot]
a0ee22ad09
Bump github.com/gofiber/fiber/v2 from 2.52.4 to 2.52.5 (#346)
Bumps [github.com/gofiber/fiber/v2](https://github.com/gofiber/fiber) from 2.52.4 to 2.52.5.
- [Release notes](https://github.com/gofiber/fiber/releases)
- [Commits](https://github.com/gofiber/fiber/compare/v2.52.4...v2.52.5)

---
updated-dependencies:
- dependency-name: github.com/gofiber/fiber/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 11:12:49 +08:00
Nova Kwok
d29959cbd4
Bump to 0.12.0 (#345) 2024-06-29 16:46:15 +08:00
Nova Kwok
89ea0affa3
Add MAX_CACHE_SIZE config (#344)
* Add MAX_CACHE_SIZE

* Bump actions version

* Optimize code

* Use Ticker to control GC loop
2024-06-29 16:42:00 +08:00
Nova Kwok
f207e3c9aa
Update README (#343) 2024-06-28 16:25:12 +08:00
dependabot[bot]
81c6e7812f
Bump github.com/schollz/progressbar/v3 from 3.14.3 to 3.14.4 (#338)
Bumps [github.com/schollz/progressbar/v3](https://github.com/schollz/progressbar) from 3.14.3 to 3.14.4.
- [Release notes](https://github.com/schollz/progressbar/releases)
- [Commits](https://github.com/schollz/progressbar/compare/v3.14.3...v3.14.4)

---
updated-dependencies:
- dependency-name: github.com/schollz/progressbar/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 18:36:57 +08:00
dependabot[bot]
53487b5496
Bump github.com/valyala/fasthttp from 1.52.0 to 1.55.0 (#339)
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.52.0 to 1.55.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.52.0...v1.55.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 18:36:40 +08:00
dependabot[bot]
5b3e2f30d7
Bump golang.org/x/image from 0.17.0 to 0.18.0 (#340)
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/image/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 18:31:29 +08:00
Syed Cherry
d9c542de2d
Bump github.com/davidbyttow/govips/v2 to 2.15.0 (#337) 2024-06-07 13:36:33 +08:00
dependabot[bot]
74c6aa6906
--- (#334)
updated-dependencies:
- dependency-name: github.com/schollz/progressbar/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 19:43:21 +08:00
dependabot[bot]
e69c3a2a9d
Bump golang.org/x/net from 0.21.0 to 0.23.0 (#329)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-23 13:44:23 +08:00
Benny
be32328998
Fix Malformed dir traversal (#331)
* Directory traversal with malformed HTTP request

#330

* bump version

* also %2e

* Use prefix to check invalid Path

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2024-04-23 13:15:40 +08:00
Nova Kwok
c7bebfca34
Add EXTRA_PARAMS_CROP_INTERESTING (#328) 2024-04-19 10:06:05 +08:00
Nova Kwok
b5842b264c
Allow jxl based on Accept header (#326) 2024-04-10 04:11:33 +01:00
dependabot[bot]
8c15bf3a03
Bump github.com/gofiber/fiber/v2 from 2.52.3 to 2.52.4 (#324)
Bumps [github.com/gofiber/fiber/v2](https://github.com/gofiber/fiber) from 2.52.3 to 2.52.4.
- [Release notes](https://github.com/gofiber/fiber/releases)
- [Commits](https://github.com/gofiber/fiber/compare/v2.52.3...v2.52.4)

---
updated-dependencies:
- dependency-name: github.com/gofiber/fiber/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 10:40:50 +08:00
dependabot[bot]
ac30605124
Bump github.com/gofiber/fiber/v2 from 2.52.2 to 2.52.3 (#323)
Bumps [github.com/gofiber/fiber/v2](https://github.com/gofiber/fiber) from 2.52.2 to 2.52.3.
- [Release notes](https://github.com/gofiber/fiber/releases)
- [Commits](https://github.com/gofiber/fiber/compare/v2.52.2...v2.52.3)

---
updated-dependencies:
- dependency-name: github.com/gofiber/fiber/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 10:36:16 +08:00
Nova Kwok
43c275e3ec
Adds JPEG XL support, max_height/max_width support (#321)
* WIP JXL

* Fix test

* Tries to fix autobuild

* Tries to fix autobuild

* Add setup go in codeql

* Bump actions version

* Do not print curl output in CI

* Do not print curl output in CI

* Remove Metadata on RAW image

* Update sample config

* better loop

* Prefetch should also respect AllowedType

* Better Export params and UA handle

* Only do conversion on supported formats

* CONVERT_TYPES default to webp only

* CONVERT_TYPES default to webp only

* Add GIF to AllowedTypes

* Update README
2024-03-22 15:12:09 +08:00
dependabot[bot]
ddcb5323b5
Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 (#319)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 10:39:31 +08:00
dependabot[bot]
5a9b4edfd1
Bump github.com/gofiber/fiber/v2 from 2.52.1 to 2.52.2 (#320)
Bumps [github.com/gofiber/fiber/v2](https://github.com/gofiber/fiber) from 2.52.1 to 2.52.2.
- [Release notes](https://github.com/gofiber/fiber/releases)
- [Commits](https://github.com/gofiber/fiber/compare/v2.52.1...v2.52.2)

---
updated-dependencies:
- dependency-name: github.com/gofiber/fiber/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 10:38:47 +08:00
Nova Kwok
ca1050d3c7
Optimized Dockerfile, bump version (#318)
* Optimized Dockerfile, bump version

* Remove unused extraParams
2024-02-29 20:06:15 +08:00
dependabot[bot]
61880e2cdf
Bump github.com/schollz/progressbar/v3 from 3.14.1 to 3.14.2 (#316)
Bumps [github.com/schollz/progressbar/v3](https://github.com/schollz/progressbar) from 3.14.1 to 3.14.2.
- [Release notes](https://github.com/schollz/progressbar/releases)
- [Commits](https://github.com/schollz/progressbar/compare/v3.14.1...v3.14.2)

---
updated-dependencies:
- dependency-name: github.com/schollz/progressbar/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-29 18:59:00 +08:00
dependabot[bot]
55c04d2d9e
Bump github.com/gofiber/fiber/v2 from 2.52.0 to 2.52.1 (#315)
Bumps [github.com/gofiber/fiber/v2](https://github.com/gofiber/fiber) from 2.52.0 to 2.52.1.
- [Release notes](https://github.com/gofiber/fiber/releases)
- [Commits](https://github.com/gofiber/fiber/compare/v2.52.0...v2.52.1)

---
updated-dependencies:
- dependency-name: github.com/gofiber/fiber/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 13:14:21 +08:00
Nova Kwok
eb2b6d16c5
Bump govips to 2.14 (#317) 2024-02-26 16:23:08 +08:00
dependabot[bot]
c92156177a
Bump github.com/valyala/fasthttp from 1.51.0 to 1.52.0 (#314)
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.51.0 to 1.52.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.51.0...v1.52.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-20 12:03:23 +08:00
Nova Kwok
9be1a6b1ed
Fix tests, bump version (#312) 2024-02-11 05:04:19 +01:00
HolgerHuo
123c96dde7
add: cache for remote images (#310)
* add: cache for remote image requests

* update: use default expiration for NoExpiration setting

* update: clean code

* fix: do not save empty etag

* fix: panic during type assertion
2024-02-11 10:55:23 +08:00
Nova Kwok
12d4cc1a0b
Upgrade to Go 1.22 (#311) 2024-02-10 10:00:40 +01:00
dependabot[bot]
0dc7a0f0e1
Bump github.com/gofiber/fiber/v2 from 2.51.0 to 2.52.0 (#309)
Bumps [github.com/gofiber/fiber/v2](https://github.com/gofiber/fiber) from 2.51.0 to 2.52.0.
- [Release notes](https://github.com/gofiber/fiber/releases)
- [Commits](https://github.com/gofiber/fiber/compare/v2.51.0...v2.52.0)

---
updated-dependencies:
- dependency-name: github.com/gofiber/fiber/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-10 15:37:54 +08:00
Nova Kwok
1ec981b1fb
Read all pages (#308)
* Read all pages

* Bump to 0.10.6
2023-12-29 21:24:56 +08:00
Nova Kwok
d35e0e0d0b
Lock on convert (#307)
* Lock on convert

* Fix typo

* Should use debug for convert lock

* Bump to 0.10.5
2023-12-29 19:38:05 +08:00
Nova Kwok
484c876e86
Bump to 0.10.4 (#304) 2023-12-18 15:36:29 +08:00
Nova Kwok
d83f6667cc
Refine convert part (#303)
* Refine convert part

* Only open image once

* More refine
2023-12-16 20:12:42 +01:00
Nova Kwok
c771160a05
Ignore GIF when converting to AVIF (#302)
* Ignore GIF when converting to AVIF

* Allow WebP as source
2023-12-01 20:26:27 +08:00
Nova Kwok
d67601af66
Fix link in README.md and fix CI permission (#299) 2023-11-24 08:32:03 +01:00