nakama icon indicating copy to clipboard operation
nakama copied to clipboard

Nakama Client SDKs should append port after host name instead of after full host path

Open smsunarto opened this issue 8 months ago • 1 comments

Currently, the Nakama client SDK will naively append the passed-in port after whatever is passed in as the host paramater

For example:

var client = new Nakama.Client("http", "127.0.0.1", 7350, "defaultkey");

will produce http://127.0.0.1:7350. Which works out just fine.


However, this becomes a problem when you use a path-based load balancer:

var client = new Nakama.Client("http", "example.com/nakama", 7350, "defaultkey");

The client SDK will append the port after the full path instead of the hostname, therefore producing -> http://example.com/nakama:7350 which is invalid. It should've been http://example.com:7350/nakama

Would be great if we can cover this edge case :D

smsunarto avatar May 28 '24 20:05 smsunarto