webp-sh / webp_server_go

Go version of WebP Server. A tool that will serve your JPG/PNG/BMP/SVGs as WebP/AVIF format with compression, on-the-fly.
https://docs.webp.sh
GNU General Public License v3.0
1.79k stars 174 forks source link

Parse flat before load config #275

Closed n0vad3v closed 1 year ago

n0vad3v commented 1 year ago

Fix for https://github.com/webp-sh/webp_server_go/issues/271,will parse and process flags before loading config file, affects both docker image and binary.

docker run --rm webpsh/webp-server-go webp-server -dump-config

{
  "HOST": "127.0.0.1",
  "PORT": "3333",
  "QUALITY": "80",
  "IMG_PATH": "./pics",
  "EXHAUST_PATH": "./exhaust",
  "IMG_MAP": {},
  "ALLOWED_TYPES": ["jpg","png","jpeg","bmp","svg"],
  "ENABLE_AVIF": false,
  "ENABLE_EXTRA_PARAMS": false
}
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 12.1)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 12.1)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)