mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-09-30 10:35:43 +00:00
apply h2 http header on server side
This commit is contained in:
parent
1d7e497599
commit
452de7c964
@ -71,6 +71,15 @@ func (l *Listener) ServeHTTP(writer http.ResponseWriter, request *http.Request)
|
|||||||
}
|
}
|
||||||
|
|
||||||
writer.Header().Set("Cache-Control", "no-store")
|
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)
|
writer.WriteHeader(200)
|
||||||
if f, ok := writer.(http.Flusher); ok {
|
if f, ok := writer.(http.Flusher); ok {
|
||||||
f.Flush()
|
f.Flush()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user