diff --git a/fediseer/apis/v1/censures.py b/fediseer/apis/v1/censures.py index 51b9140..1fef2af 100644 --- a/fediseer/apis/v1/censures.py +++ b/fediseer/apis/v1/censures.py @@ -13,7 +13,7 @@ class CensuresGiven(Resource): get_parser.add_argument("min_censures", required=False, default=1, type=int, help="Limit to this amount of censures of more", location="args") get_parser.add_argument("reasons_csv", required=False, type=str, help="Only retrieve censures where their reasons include any of the text in this csv", location="args") - decorators = [limiter.limit("30/minute"), limiter.limit("5/minute", key_func = get_request_path)] + decorators = [limiter.limit("30/minute"), limiter.limit("20/minute", key_func = get_request_path)] @api.expect(get_parser) @cache.cached(timeout=10, query_string=True) @api.marshal_with(models.response_model_model_Censures_get, code=200, description='Instances', skip_none=True) @@ -152,7 +152,7 @@ class Censures(Resource): return {"domains": [instance["domain"] for instance in instance_details]},200 return {"instances": instance_details},200 - decorators = [limiter.limit("30/minute"), limiter.limit("5/minute", key_func = get_request_path)] + decorators = [limiter.limit("30/minute"), limiter.limit("20/minute", key_func = get_request_path)] put_parser = reqparse.RequestParser() put_parser.add_argument("apikey", type=str, required=True, help="The sending instance's API key.", location='headers') put_parser.add_argument("Client-Agent", default="unknown:0:unknown", type=str, required=False, help="The client name and version.", location="headers") diff --git a/fediseer/apis/v1/endorsements.py b/fediseer/apis/v1/endorsements.py index e9a9bbc..b7a4de1 100644 --- a/fediseer/apis/v1/endorsements.py +++ b/fediseer/apis/v1/endorsements.py @@ -13,7 +13,7 @@ class Approvals(Resource): get_parser.add_argument("min_endorsements", required=False, default=1, type=int, help="Limit to this amount of endorsements of more", location="args") get_parser.add_argument("reasons_csv", required=False, type=str, help="Only retrieve endorsements where their reasons include any of the text in this csv", location="args") - decorators = [limiter.limit("30/minute"), limiter.limit("5/minute", key_func = get_request_path)] + decorators = [limiter.limit("30/minute"), limiter.limit("20/minute", key_func = get_request_path)] @api.expect(get_parser) @cache.cached(timeout=10, query_string=True) @api.marshal_with(models.response_model_model_Endorsed_get, code=200, description='Instances', skip_none=True) @@ -87,7 +87,7 @@ class Endorsements(Resource): get_parser.add_argument("csv", required=False, type=bool, help="Set to true to return just the domains as a csv. Mutually exclusive with domains", location="args") get_parser.add_argument("domains", required=False, type=bool, help="Set to true to return just the domains as a list. Mutually exclusive with csv", location="args") - decorators = [limiter.limit("30/minute"), limiter.limit("5/minute", key_func = get_request_path)] + decorators = [limiter.limit("30/minute"), limiter.limit("20/minute", key_func = get_request_path)] @api.expect(get_parser) @cache.cached(timeout=10, query_string=True) @api.marshal_with(models.response_model_model_Endorsed_get, code=200, description='Instances', skip_none=True) diff --git a/fediseer/apis/v1/guarantees.py b/fediseer/apis/v1/guarantees.py index 6a400d8..9371067 100644 --- a/fediseer/apis/v1/guarantees.py +++ b/fediseer/apis/v1/guarantees.py @@ -9,7 +9,7 @@ class Guarantors(Resource): get_parser.add_argument("csv", required=False, type=bool, help="Set to true to return just the domains as a csv. Mutually exclusive with domains", location="args") get_parser.add_argument("domains", required=False, type=bool, help="Set to true to return just the domains as a list. Mutually exclusive with csv", location="args") - decorators = [limiter.limit("30/minute"), limiter.limit("5/minute", key_func = get_request_path)] + decorators = [limiter.limit("30/minute"), limiter.limit("20/minute", key_func = get_request_path)] @api.expect(get_parser) @cache.cached(timeout=10, query_string=True) @api.marshal_with(models.response_model_model_Whitelist_get, code=200, description='Instances', skip_none=True) @@ -36,7 +36,7 @@ class Guarantees(Resource): get_parser.add_argument("csv", required=False, type=bool, help="Set to true to return just the domains as a csv. Mutually exclusive with domains", location="args") get_parser.add_argument("domains", required=False, type=bool, help="Set to true to return just the domains as a list. Mutually exclusive with csv", location="args") - decorators = [limiter.limit("30/minute"), limiter.limit("5/minute", key_func = get_request_path)] + decorators = [limiter.limit("30/minute"), limiter.limit("20/minute", key_func = get_request_path)] @api.expect(get_parser) @cache.cached(timeout=10, query_string=True) @api.marshal_with(models.response_model_model_Whitelist_get, code=200, description='Instances', skip_none=True) diff --git a/fediseer/apis/v1/hesitations.py b/fediseer/apis/v1/hesitations.py index 409deae..d8d7562 100644 --- a/fediseer/apis/v1/hesitations.py +++ b/fediseer/apis/v1/hesitations.py @@ -13,7 +13,7 @@ class HesitationsGiven(Resource): get_parser.add_argument("min_hesitations", required=False, default=1, type=int, help="Limit to this amount of hesitations of more", location="args") get_parser.add_argument("reasons_csv", required=False, type=str, help="Only retrieve hesitations where their reasons include any of the text in this csv", location="args") - decorators = [limiter.limit("30/minute"), limiter.limit("5/minute", key_func = get_request_path)] + decorators = [limiter.limit("30/minute"), limiter.limit("20/minute", key_func = get_request_path)] @api.expect(get_parser) @cache.cached(timeout=10, query_string=True) @api.marshal_with(models.response_model_model_Hesitations_get, code=200, description='Instances', skip_none=True) @@ -92,7 +92,7 @@ class Hesitations(Resource): get_parser.add_argument("csv", required=False, type=bool, help="Set to true to return just the domains as a csv. Mutually exclusive with domains", location="args") get_parser.add_argument("domains", required=False, type=bool, help="Set to true to return just the domains as a list. Mutually exclusive with csv", location="args") - decorators = [limiter.limit("30/minute"), limiter.limit("5/minute", key_func = get_request_path)] + decorators = [limiter.limit("30/minute"), limiter.limit("20/minute", key_func = get_request_path)] @api.expect(get_parser) @cache.cached(timeout=10, query_string=True) @api.marshal_with(models.response_model_model_Hesitations_get, code=200, description='Instances', skip_none=True)