diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2020-10-20 13:30:41 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2020-10-20 13:30:41 +0300 |
commit | 05c6facd72644095ca1aeff88c564dfb411fe34f (patch) | |
tree | 9292efadd79fff678a74f2f2b6cb38648c24e981 /main.go | |
parent | 7f8e9bd39def730616a4c7d1d5f00ee6ca9ea76a (diff) |
Revert "Add Host and SNI-based rate limiting"
This reverts commit 7f8e9bd39def730616a4c7d1d5f00ee6ca9ea76a.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -75,11 +75,6 @@ var ( tlsMinVersion = flag.String("tls-min-version", "tls1.2", tlsconfig.FlagUsage("min")) tlsMaxVersion = flag.String("tls-max-version", "", tlsconfig.FlagUsage("max")) - hostRateLimit = flag.Uint("host-rate-limit", 0, "Set to non-zero value to enable host-based rate limiting. Requests over rate-limit will respond with 429.") - hostRateLimitWindow = flag.Duration("host-rate-limit-window", 10*time.Minute, "Define a host-bassed rate limiting window") - tlsSniRateLimit = flag.Uint("tls-sni-rate-limit", 0, "Set to non-zero value to enable tls-sni-based rate limiting. New connections over that limit will be rejected.") - tlsSniRateLimitWindow = flag.Duration("tls-sni-limit-window", 10*time.Minute, "Define a tls-sni-bassed rate limiting window") - disableCrossOriginRequests = flag.Bool("disable-cross-origin-requests", false, "Disable cross-origin requests") // See init() @@ -180,10 +175,6 @@ func configFromFlags() appConfig { config.TLSMinVersion = tlsconfig.AllTLSVersions[*tlsMinVersion] config.TLSMaxVersion = tlsconfig.AllTLSVersions[*tlsMaxVersion] config.CustomHeaders = header - config.HostRateLimit = *hostRateLimit - config.HostRateLimitWindow = *hostRateLimitWindow - config.TLSSNIRateLimit = *tlsSniRateLimit - config.TLSSNIRateLimitWindow = *tlsSniRateLimitWindow for _, file := range []struct { contents *[]byte |