summaryrefslogtreecommitdiffstats
path: root/api/context.go
diff options
context:
space:
mode:
authorElias Nahum <nahumhbl@gmail.com>2016-03-01 14:17:29 -0300
committerElias Nahum <nahumhbl@gmail.com>2016-03-01 14:17:29 -0300
commit81f97ebc88be468f3cefecf8c850459d7eccc459 (patch)
treeb25020058b893fec416ba5949a5a4500ba7c6c10 /api/context.go
parentba6a38a7f6c497e025708111046d67875c4361be (diff)
downloadchat-81f97ebc88be468f3cefecf8c850459d7eccc459.tar.gz
chat-81f97ebc88be468f3cefecf8c850459d7eccc459.tar.bz2
chat-81f97ebc88be468f3cefecf8c850459d7eccc459.zip
Add default value to AllowCorsFrom setting
Diffstat (limited to 'api/context.go')
-rw-r--r--api/context.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/context.go b/api/context.go
index 3b9782851..91b11670b 100644
--- a/api/context.go
+++ b/api/context.go
@@ -166,8 +166,8 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// All api response bodies will be JSON formatted by default
w.Header().Set("Content-Type", "application/json")
- if len(utils.Cfg.ServiceSettings.AllowCorsFrom) > 0 {
- w.Header().Set("Access-Control-Allow-Origin", utils.Cfg.ServiceSettings.AllowCorsFrom)
+ if len(*utils.Cfg.ServiceSettings.AllowCorsFrom) > 0 {
+ w.Header().Set("Access-Control-Allow-Origin", *utils.Cfg.ServiceSettings.AllowCorsFrom)
}
if r.Method == "GET" {