refactor: use strings.SplitSeq in cookie Forwarded parsing

This commit is contained in:
2026-07-05 22:08:25 +02:00
parent 7dfc54b3e3
commit 11ec256e18

View File

@@ -46,7 +46,7 @@ func isHTTPSRequest(r *http.Request) bool {
forwarded := r.Header.Values("Forwarded")
for _, value := range forwarded {
for _, part := range strings.Split(value, ";") {
for part := range strings.SplitSeq(value, ";") {
key, val, ok := strings.Cut(strings.TrimSpace(part), "=")
if ok && strings.EqualFold(key, "proto") && strings.EqualFold(strings.Trim(val, `"`), "https") {
return true