-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Set bot useragent for Inflator #3490
Conversation
Without having fully understood the syntax, do you think it would be possible to include the word |
eceb9a0
to
03113c3
Compare
Done in this PR, going to the next now... |
Co-authored-by: DasSkelett <dasskelett@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HyperEdit and Graphotron are working again right now, let's see what happens when we deploy this. But it's probably easier for @Ezriilc to work with a stationary target, and with the logs showing the new user-agent string.
However, don't let me become a problem. Y'all do your thing and I'll try to keep up. lol |
Background
CKAN and Netkan both use a default
User-Agent
ofMozilla/4.0 (compatible; CKAN)
.Motivation
This
User-Agent
does not identify the Inflator as a bot, which it most certainly is.See KSP-SpaceDock/SpaceDock#436 for why we might want to do that.
Changes
I don't know if there's a comprehensive reference on how to create a
User-Agent
string; the best reference I was able to find was:Based on the examples presented there, the Inflator's
User-Agent
is now:Mozilla/5.0 (compatible; Netkanbot/1.0; CKAN; +https://github.com/KSP-CKAN/NetKAN-Infra)
I think parsers will just check whether
bot
occurs in the browser family.Blocking external dependencies
The
HyperEdit
andGraphotron
mods use a combination of strange URLs:... and the
User-Agent
string to identify Netkan requests. Requesting these URLs with the wrongUser-Agent
string results in an HTTP status 403 error. Before we merge these changes, we must work with @Ezriilc to update thekerbaltek.com
site to support the newUser-Agent
formats as well as the old format.