1
0
mirror of https://github.com/fumiama/yamaih.git synced 2026-06-08 18:10:24 +08:00

feat(proxy): skip x- headers

This commit is contained in:
源文雨
2025-03-31 01:56:54 +09:00
parent 7e3b2e189b
commit 49ad8b212f

View File

@@ -75,7 +75,8 @@ func (g *Gemini) handler(w http.ResponseWriter, r *http.Request) {
v.Code = resp.StatusCode
h := w.Header()
for k, vs := range resp.Header {
if len(vs) == 0 {
lk := strings.ToLower(k)
if len(vs) == 0 || strings.HasPrefix(lk, "x-") {
continue
}
h.Set(k, vs[0])