提交设置跨域接口

This commit is contained in:
duanhf2012
2020-03-11 12:16:19 +08:00
parent 4926100b5b
commit f4d9e47949

View File

@@ -195,8 +195,8 @@ func (slf *HttpServerService) OnInit() error {
return nil
}
func (slf *ServeHTTPRouterMux) SetAlowOrigin(w http.ResponseWriter, r *http.Request) {
slf.allowOrigin = true
func (slf *ServeHTTPRouterMux) SetAlowOrigin(allowOrigin bool) {
slf.allowOrigin = allowOrigin
}
func (slf *ServeHTTPRouterMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {