Skip to content

Conversation

holasoyender
Copy link

This is a suggestion that was discussed on the Discord support server. Related to lavalink-devs/lavalink-client#34

This pull request adds the option for clients to set a User-Agent header on socket connections to set extra information about the bot.

Headers example

Authorization: youshallnotpass
User-Id: 170939974227541168
Client-Name: lavalink-client/2.0.0
User-Agent: TestBot/1.0.0

When the User-Agent header is set, every log will have a prefix to identify the client its coming from.

@holasoyender holasoyender marked this pull request as draft March 6, 2025 14:44
@holasoyender
Copy link
Author

As there is no actual way of creating a relation between a websocket connection and a http request, the easiest way of implementing it is to read the user-agent from the requests, asking for client library devs to also include that header on every request.

Related to holasoyender/lavalink-client@8dfaf59

@holasoyender holasoyender marked this pull request as ready for review March 6, 2025 23:50
@holasoyender holasoyender changed the base branch from master to dev March 6, 2025 23:52
@holasoyender holasoyender force-pushed the master branch 2 times, most recently from 3e78d27 to efed40d Compare March 6, 2025 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants