solve conflict

This commit is contained in:
vanilia
2025-12-03 12:04:50 +07:00
parent b88f6dff39
commit 3b689e4723
4 changed files with 5 additions and 5 deletions
@@ -81,7 +81,7 @@ func GuardMW(next http.Handler) http.Handler {
credential.UserName = r.Header.Get("X-Sync-UserName")
if credential.Source != "" || credential.SecretKey != "" || credential.UserName != "" {
// validate secretKey and source
if credential.SecretKey != is.O.SecretKey || credential.Source != is.O.OldSource {
if credential.SecretKey != is.O.SecretKey || credential.Source != is.O.Source {
rw.WriteJSON(w, http.StatusUnauthorized, d.IS{"message": "invalid consumer credential"}, nil)
return
}