feat: switch client API branding to MeetingIM
This commit is contained in:
+3
-3
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user