feat: switch client API branding to MeetingIM

This commit is contained in:
richjohnrambo
2026-08-31 01:22:53 +08:00
parent c6a243ee59
commit 9f647de4d0
48 changed files with 717 additions and 271 deletions
+3 -3
View File
@@ -300,7 +300,7 @@ func cacheControlHandler(maxAge int, handler http.Handler) http.Handler {
// Get API key from an HTTP request.
func getAPIKey(req *http.Request) string {
// Check header.
apikey := req.Header.Get("X-Tinode-APIKey")
apikey := req.Header.Get("X-MeetingIM-APIKey")
if apikey != "" {
return apikey
}
@@ -328,8 +328,8 @@ func getAPIKey(req *http.Request) string {
// Extracts authorization credentials from an HTTP request.
// Returns authentication method and secret.
func getHttpAuth(req *http.Request) (method, secret string) {
// Check X-Tinode-Auth header.
if parts := strings.Split(req.Header.Get("X-Tinode-Auth"), " "); len(parts) == 2 {
// Check MeetingIM product auth header.
if parts := strings.Split(req.Header.Get("X-MeetingIM-Auth"), " "); len(parts) == 2 {
method, secret = parts[0], parts[1]
return
}