Add headers config, closes #25
This commit is contained in:
parent
6aaa2b521d
commit
8526805c2f
3 changed files with 9 additions and 0 deletions
|
@ -323,6 +323,10 @@ func (d *Dispatch) serveIndex(w http.ResponseWriter, r *http.Request) {
|
|||
w.Header().Set("Strict-Transport-Security", hstsHeader)
|
||||
}
|
||||
|
||||
for k, v := range d.Config().Headers {
|
||||
w.Header().Set(k, v)
|
||||
}
|
||||
|
||||
if strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") {
|
||||
w.Header().Set("Content-Encoding", "gzip")
|
||||
w.Header().Set("Content-Length", indexPageLen)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue