mirror of
https://github.com/fumiama/yamaih.git
synced 2026-06-30 08:50:37 +08:00
feat(proxy): skip x- headers
This commit is contained in:
@@ -75,7 +75,8 @@ func (g *Gemini) handler(w http.ResponseWriter, r *http.Request) {
|
|||||||
v.Code = resp.StatusCode
|
v.Code = resp.StatusCode
|
||||||
h := w.Header()
|
h := w.Header()
|
||||||
for k, vs := range resp.Header {
|
for k, vs := range resp.Header {
|
||||||
if len(vs) == 0 {
|
lk := strings.ToLower(k)
|
||||||
|
if len(vs) == 0 || strings.HasPrefix(lk, "x-") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
h.Set(k, vs[0])
|
h.Set(k, vs[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user