Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifying clients with their User-Agent header #1136

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

holasoyender
Copy link

This is a suggestion that was discussed on the Discord support server. Related to lavalink-devs/lavalink-client#34, #1135 and holasoyender/lavalink-client@8dfaf59

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

Headers example (for websockets)

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

Headers example (for http requests)

Authorization: youshallnotpass
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.

…connection.

Adding documentation for client libraries to include the User-Agent header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants