Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
139 stars 2 forks source link

Add a "User-Agent" to the request headers for HTTP/Websockets to prevent services to think that the user is a bot #2764

Open ScarsTRF opened 2 months ago

ScarsTRF commented 2 months ago

Is your feature request related to a problem? Please describe.

I've recently been working on a project on my server where I would be hosting some WebSockets over cloudflare and other services. I run a lot of Bot Protections on my server via cloudflare but when testing my WebSocket I keep getting 403 "Forbidden".

Now I've Done some testing with my system when running a app without a User-Agent header to the WebSocket Request instantly just blocks me, but when adding something to the header for the User-Agent, I instantly connect

This could also be the case for many other services as well and could be really annoying to debug.

Describe the solution you'd like

For all HTTP/WebSocket Requests you could just add something like "Resonite/GAMEVERSION" like "Resonite/2024.8.5.1341" to prevent this.

Describe alternatives you've considered

None

Additional Context

This will more than likely fix issues around #189 as MANY services require User-Agent headers so you're not blocked

Requesters

Discord: scarstrf Resonite: U-ScarsTRF

epicEaston197 commented 2 months ago

It would be really nice if this also worked for other HTTP things as well I've had Images/Videos not load on my Mastodon client just because The server required a user agent in order for me to view the content

ProbablePrime commented 2 months ago

Other items are covered in: https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/189