Hello Sendbird, I’m a developer and I wanted to report a bug found on the iOS Sendbird Chat SDK, in the method ‘connect’ that I use, I put a proxy to redirect the request to my own custom server. The string introduced is something like this “https://[baseUrl].pt/chat/api" (this is the proxy url put on the arg apiHost in the method connect), and using a proxy application locally to see where the requests go to, I noticed the path from the SDK request was using only the baseUrl from the proxy that was given and not the full proxy url with the paths. Here’s an example of what is expected and what occurs:
Expected: “https://[baseUrl].pt/chat/api/v3/users/[userID]/my_group_channel/(…)"
What happened: “https://[baseUrl].pt/v3/users/[userID]/my_group_channel/(…)”
It removed the paths from the full proxyUrl, the url is a static variable, and its unchanged through out the code. The requests that do this are all internal requests done by the SDK, and the only usage/assignment of the proxy url to the SDK is in the ‘connect’ function.
The function in question is this one:
/// Performs a connection to Sendbird with the user ID and the access token.
///
/// - Parameters :
/// - userId: user ID
/// - authToken: authToken
/// - apiHost: apiHost. Internal use only.
/// - wsHost: wsHost. Internal use only.
/// - completionHandler: completionHandler
/// - Seealso : connect(userId:authToken:completionHandler:)
@objc public static func connect(userId: String, authToken: String?, apiHost: String?, wsHost: String?, completionHandler: SendbirdChatSDK.UserHandler? = nil )
Hope to have a response on this from you, as quickly as possible!
I’m using the SendbirdChatSDK v4.21.10
[Frequency] // How frequently is this issue occurring?
This issue is always happening since the implementation of the proxy.
[Current impact] // How is this currently impacting your implementation?
This issue is impacting very must my implementation.