From 49ad8b212f98f4582c7ba2748399e67cbccfa57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Mon, 31 Mar 2025 01:56:54 +0900 Subject: [PATCH] feat(proxy): skip x- headers --- procuratio.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/procuratio.go b/procuratio.go index 252313c..086eadf 100644 --- a/procuratio.go +++ b/procuratio.go @@ -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])