|
|
@ -112,9 +112,9 @@ export class UserConfig {
|
|
|
|
|
|
|
|
|
|
|
|
// * optional rate limit config
|
|
|
|
// * optional rate limit config
|
|
|
|
if (config.rateLimit != null) {
|
|
|
|
if (config.rateLimit != null) {
|
|
|
|
if (!Checkers.rateLimit.endpoint(config.rateLimit.login)) throw new Error('Invalid rate limit configuration');
|
|
|
|
if (!Checkers.rateLimit.endpoint(config.rateLimit.login)) throw new Error('Invalid Login rate limit configuration');
|
|
|
|
if (!Checkers.rateLimit.endpoint(config.rateLimit.upload)) throw new Error('Invalid rate limit configuration');
|
|
|
|
if (!Checkers.rateLimit.endpoint(config.rateLimit.upload)) throw new Error('Invalid Upload rate limit configuration');
|
|
|
|
if (!Checkers.rateLimit.endpoint(config.rateLimit.api)) throw new Error('Invalid rate limit configuration');
|
|
|
|
if (!Checkers.rateLimit.endpoint(config.rateLimit.api)) throw new Error('Invalid API rate limit configuration');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// All is fine, carry on!
|
|
|
|
// All is fine, carry on!
|
|
|
|