add bot protection
This commit is contained in:
parent
cdd4079418
commit
d2b531f953
1 changed files with 7 additions and 4 deletions
|
|
@ -130,11 +130,14 @@ If you have any issues, reply to this email.""",
|
|||
(Router()..post("/", (Request request) async {
|
||||
final settings = container.read(SettingsController.provider)!;
|
||||
try {
|
||||
final body = await request.readAsString();
|
||||
final body = Uri.splitQueryString(await request.readAsString());
|
||||
if (body["honeypot"]?.isNotEmpty == true) {
|
||||
return Response.movedPermanently(
|
||||
"https://ipv4.games/claim?name=federated.nexus",
|
||||
);
|
||||
}
|
||||
final registration = Registration.fromJson(
|
||||
Uri.splitQueryString(
|
||||
body,
|
||||
).map((key, value) => MapEntry(key, value.toLowerCase())),
|
||||
body.map((key, value) => MapEntry(key, value.toLowerCase())),
|
||||
);
|
||||
|
||||
final client = await container.read(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue