diff --git a/broker/broker.go b/broker/broker.go index 50b8c30..372d6ac 100644 --- a/broker/broker.go +++ b/broker/broker.go @@ -237,6 +237,7 @@ func (broker *Broker) Start(port string) { w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Methods", "GET, OPTIONS") w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length") + w.Header().Set("Content-Type", "application/json") //Set content type to Application/Json because we are serving json data broker.connectionsLock.RLock() activeConns := len(broker.connections)