Commit fbb98fbe authored by astaxie's avatar astaxie

Merge pull request #1631 from yunkai/issue1

Fix regression caused by commit ad654793
parents 23bb36d3 e3810b59
...@@ -36,6 +36,7 @@ ...@@ -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 { ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment