21 Commits

Author SHA1 Message Date
Nova Kwok
e64ded7f47
Better RAM usage (#200)
* Manually close image for GC

* Remove config

* Handle error by os.Stat

* Add more test on fetchRemoteImage

* refine TestGenOptimizedAbsPath

* Bump version to 0.8.1
2023-05-19 17:07:58 +08:00
BugFest
ccc99e2e1c
Enable AVIF compression in proxy mode (#194)
* Enable AVIF compression in proxy mode

* Fix AVIF in proxy mode PR after PR#192 merge

* Bump version to 0.8.0
2023-05-17 19:11:58 +08:00
Nova Kwok
bcb3f1452b
Support extra parameters on request (#192)
* version 1

* some update

* Fix ST1020

* Remove ST1020

* Fix CI

* Fix params

* Fix order

* Allow reqURIwithQuery pass through when proxy mode

* Fix bugs

* Extract resizeImage

* Check for err
2023-05-15 20:13:00 +08:00
Benny
a53f0ac44a
check image size (#170)
* check image size

could be useful for #169

* Remove more deprecated ioutil lib, and fix CI problem

* Fix deps

* Write a bigger file for testing

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-02-07 13:39:48 +08:00
Benny
16ff497ade
deprecate ioutil (#171) 2023-02-07 13:07:14 +08:00
Nova Kwok
64db6cc199
Try to mitigate cocurrency problem (#107)
* Try to mitigate cocurrency problem

* Remove getFileContentType in funcion

* Bump to 0.4.3 after fix
2022-03-20 16:45:07 +08:00
BennyThink
67d40b4397
CI and minor fixes
* use GitHub Actions as CI
* bump versions
* Makefile and Dockerfile improvements
* upgrade logrus
2021-12-05 19:21:29 +08:00
BennyThink
e9543522ae
avif support is almost complete 2021-12-04 17:25:26 +08:00
Benny
428192275b
choose webp or png feature (#70)
* support webp_bigger header, add test cases

* fix test case
2021-02-12 16:13:13 +08:00
Benny
0c08f65be1
fix unsupported browser + proxyMode bug, return 400 for not allow files instead of 500 (#64)
unsupported browser will go for origin, while in proxyMode we don't have cache images.

resolve #61
2020-12-06 14:02:17 +08:00
Benny
37d8d8ba13
iOS 14 support, bump to 0.3.1 (#63)
Use `accept` header first, then `user-agent` header.
Add complete test case.

This should resolve part of #61
2020-12-05 16:42:18 +08:00
Nova Kwok
9eda9ee799
Feature: Add Compression rate on header (#59)
* Add X-Compression-Rate on response header

* add test case for compression rate, change logging and other improvements

* move config to config.go, add header for safari and proxyMode, logging improvement

* update gitignore for remote-raw and coverage.txt

* Refine log level
2020-11-27 15:41:03 +08:00
BennyThink
1056963bb2
fix one test case bug, remove one easy to fail test case,
improve test case stability by adding timeout to 60s
2020-11-24 22:57:34 +08:00
Benny
08c333f3cd
Fiber v2, code format, typo,test case, go 1.15 and more (#54)
* upgrade to fiber v2

* code format

* remove redundant variables
* remove useless exportable variables/functions

* go mod replace

use our own mirror now.

* add test case for converter, use deferInit to make test more simple

* remove useless file and fix typo

* Makefile change
* upgrade to go 1.15
* remove wrong go test comments

* complete test case, coverage, coverage badge

* Fix version typo

* config struct fix

* add banner, show version, add server header, remove fiber startup message

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2020-11-21 13:26:03 +08:00
Nova Kwok
36eb669031
Update iOS render policy and test case, bump version to 0.1.5 (#50)
Update iOS render policy and test case, bump version to 0.1.5.
2020-07-14 17:56:16 +08:00
Benny
07f2fc6969
IE and assert fix (#49)
* Add test case for IE, postman and curl
* Simplify goOrigin code
* use assert
2020-07-01 21:39:28 +08:00
Benny
8970e8cf52
TestGoOrigin instead of TestgoOrigin 2020-06-30 18:18:08 +08:00
n0vad3v
99f36b35f7
Render origin image on MSIE 2020-06-30 16:12:35 +08:00
Benny~
6f8d978268
isSafari test case 2020-05-23 12:38:47 +08:00
Benny~
f150285f1c
helper_test.go
test command: go test -v helper_test.go helper.go  -cover
2020-05-23 09:12:45 +08:00
Benny~
e902d2e5d2
fix logf, add unit test as an example 2020-05-23 01:05:02 +08:00