|
|
|
@ -2,9 +2,9 @@ from slowapi import Limiter
|
|
|
|
from slowapi.util import get_remote_address
|
|
|
|
from slowapi.util import get_remote_address
|
|
|
|
from src.config import RATELIMIT_STORAGE_URI
|
|
|
|
from src.config import RATELIMIT_STORAGE_URI
|
|
|
|
|
|
|
|
|
|
|
|
limiter = Limiter(
|
|
|
|
# limiter = Limiter(
|
|
|
|
key_func=get_remote_address,
|
|
|
|
# key_func=get_remote_address,
|
|
|
|
default_limits=["120 per hour", "2880 per day"],
|
|
|
|
# default_limits=["120 per hour", "2880 per day"],
|
|
|
|
strategy="fixed-window",
|
|
|
|
# strategy="fixed-window",
|
|
|
|
storage_uri=RATELIMIT_STORAGE_URI,
|
|
|
|
# storage_uri=RATELIMIT_STORAGE_URI,
|
|
|
|
)
|
|
|
|
# )
|