🏗️ microservice fabric splitting

This commit is contained in:
2024-12-24 00:38:41 +08:00
parent 462e811742
commit 89d64336f5
311 changed files with 18384 additions and 2428 deletions

View File

@@ -0,0 +1,14 @@
package middleware
import (
"net/http"
"schisandra-album-cloud-microservices/common/errors"
"schisandra-album-cloud-microservices/common/xhttp"
)
func UnsignedCallbackMiddleware() func(w http.ResponseWriter, r *http.Request, next http.Handler, strict bool, code int) {
return func(w http.ResponseWriter, r *http.Request, next http.Handler, strict bool, code int) {
xhttp.JsonBaseResponseCtx(r.Context(), w, errors.New(http.StatusForbidden, "Unsigned callback not allowed"))
return
}
}