mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-18 13:38:22 +03:00
add minUserIDLength config option
This commit is contained in:
@@ -166,7 +166,8 @@ addDefaults(config, {
|
||||
},
|
||||
gumroad: {
|
||||
productPermalinks: ["sponsorblock"]
|
||||
}
|
||||
},
|
||||
minUserIDLength: 30
|
||||
});
|
||||
loadFromEnv(config);
|
||||
migrate(config);
|
||||
|
||||
@@ -325,7 +325,7 @@ export async function vote(ip: IPAddress, UUID: SegmentUUID, paramUserID: UserID
|
||||
return { status: 400 };
|
||||
}
|
||||
// Ignore this vote, invalid
|
||||
if (paramUserID.length < 30 && config.mode !== "test") {
|
||||
if (paramUserID.length < config.minUserIDLength) {
|
||||
return { status: 200 };
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,8 @@ export interface SBSConfig {
|
||||
}
|
||||
gumroad: {
|
||||
productPermalinks: string[],
|
||||
}
|
||||
},
|
||||
minUserIDLength: number
|
||||
}
|
||||
|
||||
export interface WebhookConfig {
|
||||
|
||||
Reference in New Issue
Block a user