forked from TrueCloudLab/frostfs-s3-gw
[#219] Return ETag in quotes
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
406075aebb
commit
b28ecef43b
17 changed files with 97 additions and 57 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-s3-gw/api/data"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-s3-gw/internal/logs"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/google/uuid"
|
||||
|
@ -293,7 +294,7 @@ func getSourceIP(r *http.Request) string {
|
|||
if match := forRegex.FindStringSubmatch(fwd); len(match) > 1 {
|
||||
// IPv6 addresses in Forwarded headers are quoted-strings. We strip
|
||||
// these quotes.
|
||||
addr = strings.Trim(match[1], `"`)
|
||||
addr = data.UnQuote(match[1])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue