feat: remove user wx_open_id key

This commit is contained in:
steven
2021-12-12 21:49:46 +08:00
parent 1edf40ef69
commit 50c8947ad5
15 changed files with 55 additions and 221 deletions

View File

@ -18,6 +18,14 @@ func AuthCheckerMiddleWare(next http.Handler) http.Handler {
})
}
func JSONResponseMiddleWare(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
next.ServeHTTP(w, r)
})
}
func CorsMiddleWare(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")