Commit 8845ccc
Changed files (1)
src
src/database.py
@@ -6,6 +6,7 @@ Note: Memory Cache is always enabled.
"""
import json
+import os
from urllib.parse import quote_plus, unquote_plus
from aioboto3 import Session
@@ -16,6 +17,10 @@ from loguru import logger
from config import DB, cache
from utils import bare_url, stringfy
+# hot fix: https://developers.cloudflare.com/r2/examples/aws/boto3/
+os.environ["AWS_REQUEST_CHECKSUM_CALCULATION"] = "when_required"
+os.environ["AWS_RESPONSE_CHECKSUM_VALIDATION"] = "when_required"
+
async def get_db(key: str) -> dict:
"""Get KV."""