From 0bbadc6d6d80da505071b4e07383ea0f07ed6322 Mon Sep 17 00:00:00 2001 From: yusing Date: Sun, 3 Nov 2024 07:34:16 +0800 Subject: [PATCH] removed default values --- compose.example.yml | 10 ++++++---- internal/net/http/middleware/rate_limit.go | 4 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compose.example.yml b/compose.example.yml index a8e5969..8025a00 100755 --- a/compose.example.yml +++ b/compose.example.yml @@ -1,3 +1,4 @@ +--- services: frontend: image: ghcr.io/yusing/go-proxy-frontend:latest @@ -27,14 +28,15 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock - ./config:/app/config + - ./error_pages:/app/error_pages # (Optional) choose one of below to enable https # 1. use existing certificate - # if your cert is not named `cert.crt` change `cert_path` in `config/config.yml` - # if your cert key is not named `priv.key` change `key_path` in `config/config.yml` - # - /path/to/certs:/app/certs + # - /path/to/certs/cert.crt:/app/certs/cert.crt + # - /path/to/certs/priv.key:/app/certs/priv.key - # 2. use autocert, certs will be stored in ./certs (or other path you specify) + # 2. use autocert, certs will be stored in ./certs + # you can also use a docker volume to store it # - ./certs:/app/certs diff --git a/internal/net/http/middleware/rate_limit.go b/internal/net/http/middleware/rate_limit.go index 262799b..8e118fd 100644 --- a/internal/net/http/middleware/rate_limit.go +++ b/internal/net/http/middleware/rate_limit.go @@ -30,9 +30,7 @@ type ( var ( RateLimiter = &Middleware{withOptions: NewRateLimiter} rateLimiterOptsDefault = rateLimiterOpts{ - Average: 100, - Burst: 1, - Period: time.Second, + Period: time.Second, } )