Spaces:
Paused
Paused
File size: 403 Bytes
8219f66 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | package handler
import (
"net/http"
"zai-proxy/internal/auth"
)
func HandleRefreshToken(w http.ResponseWriter, r *http.Request) {
if r.URL.Query().Get("token") != "CCCP_IS2_1944_STALIN" {
w.WriteHeader(403)
return
}
auth.ForceRefresh()
_, err := auth.RefreshAnonymousSession()
if err != nil {
http.Error(w, "Error: "+err.Error(), 500)
return
}
w.Write([]byte("Token refreshed OK"))
}
|