From b81d48b443f376964f8ddd8497ea22b0a85c6754 Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Wed, 24 Oct 2018 11:23:02 +0800 Subject: [PATCH] Added Content-Language header to help with in-browser auto-translation. [#8] See: https://stackoverflow.com/a/3130857/504018 --- pttweb.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pttweb.go b/pttweb.go index 4bfe0c1..00298a9 100644 --- a/pttweb.go +++ b/pttweb.go @@ -324,6 +324,7 @@ func setCommonResponseHeaders(w http.ResponseWriter) { h := w.Header() h.Set("Server", "Cryophoenix") h.Set("Content-Type", "text/html; charset=utf-8") + h.Set("Content-Language", "zh-tw") } type ErrorWrapper func(*Context, http.ResponseWriter) error