Set content type so browsers will interpret result as JSON.
This commit is contained in:
parent
d83b2fc139
commit
a607477934
@ -94,6 +94,7 @@ func newMailCounter() *mailCounter {
|
||||
|
||||
func (mc *mailCounter) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
c := map[string]int{}
|
||||
for k, v := range mc.counts {
|
||||
if v != 0 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user