Skip to content

Fix: Add User-Agent header to Vintage Story master server request#725

Open
nunopaiva1 wants to merge 2 commits into
gamedig:masterfrom
nunopaiva1:fix/vintagestory-user-agent
Open

Fix: Add User-Agent header to Vintage Story master server request#725
nunopaiva1 wants to merge 2 commits into
gamedig:masterfrom
nunopaiva1:fix/vintagestory-user-agent

Conversation

@nunopaiva1

Copy link
Copy Markdown

The Vintage Story master server returns HTTP 403 unless a valid User-Agent is provided.

This change adds a proper User-Agent header to allow successful querying.

@CosminPerRam CosminPerRam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a line in the CHANGELOG.md file.

Comment thread protocols/vintagestorymaster.js Outdated
state.raw.servers = response?.data || []
}
}
} No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a end file new line

@nunopaiva1

Copy link
Copy Markdown
Author

All set. I added the changelog entry and the newline as requested. Let me know if anything else needs changing!

@nunopaiva1 nunopaiva1 requested a review from CosminPerRam August 4, 2025 12:12
@tyronx

tyronx commented Aug 14, 2025

Copy link
Copy Markdown

This has been blocked by us on purpose because users of this software are completely overloading our services. It is being spammed to no end. To whoever uses this software, please refrain from using our online service to get your own servers player count - read it out from the /stats command.

That being said, we can look into a more straightforward solution at some point in the future.

Kindly request this to be reverted again.

@CosminPerRam

Copy link
Copy Markdown
Member

@tyronx is the /stats available via RCON (or some other remote way) in the base game? If so, we can switch to it, but if not, even if we stopped doing this and completely remove the support of the game, someone else would eventually come back to this (i.e. users just forking and applying this fix), if you'd plan to revamp the performance of the endpoint (i.e. caching, pagination or adding a whole different way of quering data directly to the servers) we could wait if that's something not taking a long while.

If RCON or other ways are not available (and not planned to), we would add an API option for users to specify this header (so people would have to acknowledge this problem).

Sorry for the very late response.

@tyronx

tyronx commented Feb 28, 2026

Copy link
Copy Markdown

we don't support rcon (yet). You need to read it out from stdout. the screen command can do that

@podrivo

podrivo commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

@nunopaiva1 Were you able to work on an alternative solution as mentioned?

@tyronx Would you mind giving more details on the /stats command you mentioned?

Thank you!

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