handlers
handlers copied to clipboard
Package gorilla/handlers is a collection of useful middleware for Go HTTP services & web applications 🛃
While auditing some internal code for a common mistake made in regex patterns, we discovered a vendored copy of this line: https://github.com/gorilla/handlers/blob/3e030244b4ba0480763356fc8ca0ade6222e2da0/proxy_headers.go#L25 The line currently reads forRegex = regexp.MustCompile(`(?i)(?:for=)([^(;|,| )]+)`)...
How about to add a basic auth handler? This is still a good option for 90% of APIs. Unfortunately the golang doesn't provide it out of the box. This leads...
**Describe the problem you're having** > A clear and concise description of what the bug is. The HTTPS server uses handler config something like this without specifying AllowedOrigins, ``` Handler:...
Fixes #227 **Summary of Changes** 1. Split `X-Forwarded-For` using space rather than comma-space. 2. Trim whitespace from resulting value. 3. Add tests. (Including for `Forwarded` parsing, which didn't have this...
**Describe the problem you're having** > A clear and concise description of what the bug is. I see having X-Request-ID in access.log will help tracing the request. … **Versions** >...
**Describe the bug** The [current code](https://github.com/gorilla/handlers/blob/3e030244b4ba0480763356fc8ca0ade6222e2da0/proxy_headers.go#L74-L78) looks like this: ```go s := strings.Index(fwd, ", ") if s == -1 { s = len(fwd) } addr = fwd[:s] ``` As can...
MethodHandler supports OPTIONS, but it's not included in Allow. https://github.com/gorilla/handlers/blob/3e030244b4ba0480763356fc8ca0ade6222e2da0/handlers.go#L32 `allow := []string{http.MethodOptions}` In case of 405, client should know OPTIONS is an option.
Fixes #234 **Summary of Changes** 1. Upgrade httpsnoop
**Describe the problem you're having** I am using multiple dependencies, some using github.com/felixge/[email protected]. Would it be possible to upgrade httpsnoop to 1.0.3? As far as I can tell, there are...
## What type of PR is this? (check all applicable) - [ ] Refactor - [x] Feature - [ ] Bug Fix - [ ] Optimization - [ ] Documentation...