22 Commits

Author SHA1 Message Date
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
794135e675
Add asterisk support on allowed type on config.json (#97) 2022-06-15 15:42:08 +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
n0vad3v
5e033a8f72
Extract checkAllowedType function.
Minor Log text optimization.
2021-12-05 22:20:39 +08:00
BennyThink
7c65d5e213
stability enhancement
1. large dimension photos
2. GET /1.webp
3. dependabot
2021-12-04 17:25:26 +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
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
2d2df5571d
Feature: WebP Proxy (#51)
* feat-webp-proxy

* Fix panic on clear Cache, modified output.

* Optimize etag fetch logic

* Update README for new docs website.

* Bump version to 0.2.0.
2020-08-06 14:55:20 +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
Nova Kwok
cfe84bf67c
Try add Etag on response by nova 2020-06-30 18:18:02 +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
c0509bb50f
upgrade logrus and fix safari ua 2020-05-22 17:16:10 +08:00
Benny~
880ef32606
log update 2020-03-07 13:34:47 +08:00
n0vad3v
ff0ec84d82
optimize log 2020-03-07 13:09:32 +08:00
Benny~
579be00b41
split functions to different files. Build and run, please use package mode, example:
`go run .`
`go build .`
`go run . --prefetch`
2020-03-04 20:14:45 +08:00