mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-25 00:53:31 -06:00
[feature] add rate limit middleware (#741)
* feat: add rate limit middleware * chore: update vendor dir * chore: update readme with new dependency * chore: add rate limit infos to swagger.md file * refactor: add ipv6 mask limiter option Add IPv6 CIDR /64 mask * refactor: increase rate limit to 1000 Address https://github.com/superseriousbusiness/gotosocial/pull/741#discussion_r945584800 Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
This commit is contained in:
parent
daec9ab10e
commit
bee8458a2d
43 changed files with 4692 additions and 443 deletions
79
vendor/github.com/ulule/limiter/v3/.golangci.yml
generated
vendored
Normal file
79
vendor/github.com/ulule/limiter/v3/.golangci.yml
generated
vendored
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
run:
|
||||
concurrency: 4
|
||||
deadline: 1m
|
||||
issues-exit-code: 1
|
||||
tests: true
|
||||
|
||||
|
||||
output:
|
||||
format: colored-line-number
|
||||
print-issued-lines: true
|
||||
print-linter-name: true
|
||||
|
||||
|
||||
linters-settings:
|
||||
errcheck:
|
||||
check-type-assertions: false
|
||||
check-blank: false
|
||||
govet:
|
||||
check-shadowing: false
|
||||
use-installed-packages: false
|
||||
golint:
|
||||
min-confidence: 0.8
|
||||
gofmt:
|
||||
simplify: true
|
||||
gocyclo:
|
||||
min-complexity: 10
|
||||
maligned:
|
||||
suggest-new: true
|
||||
dupl:
|
||||
threshold: 80
|
||||
goconst:
|
||||
min-len: 3
|
||||
min-occurrences: 3
|
||||
misspell:
|
||||
locale: US
|
||||
lll:
|
||||
line-length: 140
|
||||
unused:
|
||||
check-exported: false
|
||||
unparam:
|
||||
algo: cha
|
||||
check-exported: false
|
||||
nakedret:
|
||||
max-func-lines: 30
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- megacheck
|
||||
- govet
|
||||
- errcheck
|
||||
- gas
|
||||
- structcheck
|
||||
- varcheck
|
||||
- ineffassign
|
||||
- deadcode
|
||||
- typecheck
|
||||
- unconvert
|
||||
- gocyclo
|
||||
- gofmt
|
||||
- misspell
|
||||
- lll
|
||||
- nakedret
|
||||
enable-all: false
|
||||
disable:
|
||||
- depguard
|
||||
- prealloc
|
||||
- dupl
|
||||
- maligned
|
||||
disable-all: false
|
||||
|
||||
|
||||
issues:
|
||||
exclude-use-default: false
|
||||
max-per-linter: 1024
|
||||
max-same: 1024
|
||||
exclude:
|
||||
- "G304"
|
||||
- "G101"
|
||||
- "G104"
|
||||
Loading…
Add table
Add a link
Reference in a new issue