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

Add user agent to mirror requests #23

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

cmyui
Copy link
Member

@cmyui cmyui commented Nov 18, 2024

Requested by @Calemy for Mino; applied to all mirror requests

@@ -27,7 +27,9 @@ class AbstractBeatmapMirror(ABC):
supported_resources: ClassVar[set[MirrorResource]]

def __init__(self, *args: Any, **kwargs: Any) -> None:
self.http_client = httpx.AsyncClient()
self.http_client = httpx.AsyncClient(
headers={"User-Agent": "Akatsuki-Beatmaps-Service/1.0"},
Copy link
Member Author

@cmyui cmyui Nov 18, 2024

Choose a reason for hiding this comment

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

Could be something else, e.g. Akatsuki-Private-Server or Akatsuki-osu.

Cannot use any branding re. "osu!{name}" re. osuAkatsuki/bancho.py#272

@cmyui cmyui enabled auto-merge (squash) November 18, 2024 04:33
@cmyui cmyui merged commit 1fe7b89 into master Nov 18, 2024
2 checks passed
@cmyui cmyui deleted the user-agent-for-mirror-reqs branch November 18, 2024 04:33
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.

2 participants