mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-14 04:37:33 +08:00
提交设置跨域接口
This commit is contained in:
@@ -195,8 +195,8 @@ func (slf *HttpServerService) OnInit() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (slf *ServeHTTPRouterMux) SetAlowOrigin(w http.ResponseWriter, r *http.Request) {
|
func (slf *ServeHTTPRouterMux) SetAlowOrigin(allowOrigin bool) {
|
||||||
slf.allowOrigin = true
|
slf.allowOrigin = allowOrigin
|
||||||
}
|
}
|
||||||
|
|
||||||
func (slf *ServeHTTPRouterMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
func (slf *ServeHTTPRouterMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user