feat(client-verification): add client verification (#104)
New configurations: - `CHECK_CLIENT_VERSION` enables the check (default=True) - `CLIENT_VERSION_URLS` contains a chain of valid client hashes. [osu!](https://osu.ppy.sh/home/download) and [osu! GU](https://github.com/GooGuTeam/osu/releases) are valid by default. View [g0v0-client-versions](https://github.com/GooGuTeam/g0v0-client-versions) to learn how to support your own client. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
10
app/dependencies/client_verification.py
Normal file
10
app/dependencies/client_verification.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Annotated
|
||||
|
||||
from app.service.client_verification_service import (
|
||||
ClientVerificationService as OriginalClientVerificationService,
|
||||
get_client_verification_service,
|
||||
)
|
||||
|
||||
from fastapi import Depends
|
||||
|
||||
ClientVerificationService = Annotated[OriginalClientVerificationService, Depends(get_client_verification_service)]
|
||||
Reference in New Issue
Block a user