1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 22:00:55 +00:00

Merge pull request #1631 from yunkai/issue1

Fix regression caused by commit ad65479
This commit is contained in:
astaxie 2016-01-27 10:13:30 +08:00
commit fbb98fbe1f

View File

@ -36,6 +36,7 @@
package cors package cors
import ( import (
"net/http"
"regexp" "regexp"
"strconv" "strconv"
"strings" "strings"
@ -215,6 +216,7 @@ func Allow(opts *Options) beego.FilterFunc {
for key, value := range headers { for key, value := range headers {
ctx.Output.Header(key, value) ctx.Output.Header(key, value)
} }
ctx.ResponseWriter.WriteHeader(http.StatusOK)
return return
} }
headers = opts.Header(origin) headers = opts.Header(origin)