Commit 9710fe40b5a830412a2df9dded9952ceaa895eed
1 parent
aa433aa2
Exists in
master
提交
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
src/HttpServer/logic/httpserver.go
@@ -772,14 +772,14 @@ func GetUserData(w http.ResponseWriter, r *http.Request) { | @@ -772,14 +772,14 @@ func GetUserData(w http.ResponseWriter, r *http.Request) { | ||
772 | func UserLogin(w http.ResponseWriter, r *http.Request) { | 772 | func UserLogin(w http.ResponseWriter, r *http.Request) { |
773 | //w.Header().Set("Access-Control-Allow-Origin", "*") //允许访问所有域 | 773 | //w.Header().Set("Access-Control-Allow-Origin", "*") //允许访问所有域 |
774 | //w.Header().Set("Content-Type", "application/json") | 774 | //w.Header().Set("Content-Type", "application/json") |
775 | - logger.Info("%%%%%%%%%%%%%%%%path=%v", *r.URL) | 775 | + /*logger.Info("%%%%%%%%%%%%%%%%path=%v", *r.URL) |
776 | for k, v := range r.Header { | 776 | for k, v := range r.Header { |
777 | logger.Info("*********************key=%v,value=%v", k, v) | 777 | logger.Info("*********************key=%v,value=%v", k, v) |
778 | } | 778 | } |
779 | 779 | ||
780 | w.Header().Add("Access-Control-Allow-Headers", "*") | 780 | w.Header().Add("Access-Control-Allow-Headers", "*") |
781 | w.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Length, X-CSRF-Token, Token,session,X_Requested_With,Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Pragma") | 781 | w.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Length, X-CSRF-Token, Token,session,X_Requested_With,Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Pragma") |
782 | - | 782 | + */ |
783 | Uuid := 0 | 783 | Uuid := 0 |
784 | Token := "" | 784 | Token := "" |
785 | if len(r.Header) > 0 { | 785 | if len(r.Header) > 0 { |
@@ -803,8 +803,8 @@ func UserLogin(w http.ResponseWriter, r *http.Request) { | @@ -803,8 +803,8 @@ func UserLogin(w http.ResponseWriter, r *http.Request) { | ||
803 | s := string(result) | 803 | s := string(result) |
804 | if s == "" { | 804 | if s == "" { |
805 | logger.Error("UserLogin bodynil") | 805 | logger.Error("UserLogin bodynil") |
806 | - fmt.Fprint(w, "failed") | ||
807 | - return | 806 | + //fmt.Fprint(w, "failed") |
807 | + //return | ||
808 | } | 808 | } |
809 | logger.Info("UserLogin , body:%v,uuid=%v token=%v", s, Uuid, Token) | 809 | logger.Info("UserLogin , body:%v,uuid=%v token=%v", s, Uuid, Token) |
810 | 810 |