colyseus / colyseus-unity-sdk

⚔ Colyseus Multiplayer SDK for Unity
https://docs.colyseus.io/getting-started/unity-sdk/
MIT License
378 stars 104 forks source link

Allow developer to specify http headers for any matchmaking requests. #99

Closed rnd256 closed 4 years ago

Wenish commented 4 years ago

Hey @rnd256 Thanks for you contribution. Can you reference an issue or provide a short description for the use case of the pull request?

rnd256 commented 4 years ago

Sure, no problem. I discussed this briefly with endel in the #help discord channel yesterday, and he pointed me towards the code locations I ended up changing.

I have a staging server behind nginx with basic http auth, so Colyseus can't connect unless I set an Authorization header. This PR is a general solution that lets devs set whichever headers they need for the connection.