1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 09:50:43 +00:00

apply h2 http header on server side

This commit is contained in:
Shelikhoo 2021-03-02 11:36:02 +00:00
parent 1d7e497599
commit 452de7c964
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -71,6 +71,15 @@ func (l *Listener) ServeHTTP(writer http.ResponseWriter, request *http.Request)
}
writer.Header().Set("Cache-Control", "no-store")
for _, httpHeader := range l.config.Header {
for _, httpHeaderValue := range httpHeader.Value {
writer.Header().Set(httpHeader.Name, httpHeaderValue)
}
}
writer.WriteHeader(200)
if f, ok := writer.(http.Flusher); ok {
f.Flush()