Commit 0e9394154c9e8535e9329702e4a4d3150c6a2e2e

Authored by 陆恒
1 parent 83103b44
Exists in master

提交

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
src/HttpServer/logic/httpserver.go
@@ -746,14 +746,14 @@ func GetUserData(w http.ResponseWriter, r *http.Request) { @@ -746,14 +746,14 @@ func GetUserData(w http.ResponseWriter, r *http.Request) {
746 } 746 }
747 747
748 func UserLogin(w http.ResponseWriter, r *http.Request) { 748 func UserLogin(w http.ResponseWriter, r *http.Request) {
749 - /*logger.Info("%%%%%%%%%%%%%%%%path=%v", *r.URL) 749 + logger.Info("%%%%%%%%%%%%%%%%path=%v", *r.URL)
750 for k, v := range r.Header { 750 for k, v := range r.Header {
751 logger.Info("*********************key=%v,value=%v", k, v) 751 logger.Info("*********************key=%v,value=%v", k, v)
752 } 752 }
753 753
754 w.Header().Add("Access-Control-Allow-Headers", "") 754 w.Header().Add("Access-Control-Allow-Headers", "")
755 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") 755 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")
756 - */ 756 +
757 Uuid := 0 757 Uuid := 0
758 Token := "" 758 Token := ""
759 if len(r.Header) > 0 { 759 if len(r.Header) > 0 {
@@ -769,7 +769,7 @@ func UserLogin(w http.ResponseWriter, r *http.Request) { @@ -769,7 +769,7 @@ func UserLogin(w http.ResponseWriter, r *http.Request) {
769 respstr, _ := json.Marshal(&resp) 769 respstr, _ := json.Marshal(&resp)
770 fmt.Fprint(w, string(respstr)) 770 fmt.Fprint(w, string(respstr))
771 logger.Error("UserLogin uuid=0! failed!")*/ 771 logger.Error("UserLogin uuid=0! failed!")*/
772 - return 772 + //return
773 //} 773 //}
774 result, _ := ioutil.ReadAll(r.Body) 774 result, _ := ioutil.ReadAll(r.Body)
775 r.Body.Close() 775 r.Body.Close()