Add cache headers

This commit is contained in:
Dylan
2026-04-18 14:26:29 +01:00
parent 3d4e42223f
commit a610cd8e29
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ RUN PKG_CONFIG_PATH="/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/ffmpeg_
--pkg-config-flags="--static" --extra-ldexeflags="-static" --extra-libs="-lpthread -lm" --bindir="/bin" --disable-shared --enable-static --enable-gpl --enable-pthreads \
--enable-libx264 --enable-libsvtav1 --disable-ffplay
RUN make -j
RUN make -j 8
FROM public.ecr.aws/lambda/python:3.12
+1
View File
@@ -127,6 +127,7 @@ def lambda_handler(event, context):
"headers":
{
"Content-Type": "image/avif",
"Cache-Control": "public, max-age=604800, immutable"
},
'body': encoded_string,
'isBase64Encoded': True
+1 -1
View File
@@ -514,7 +514,7 @@ def fixTweetData(tweet):
def extractStatus(url,workaroundTokens=None):
# TODO: commented out methods are too slow/unreliable at the moment
methods=[extractStatusV2Rest_Anon,extractStatusV2,extractStatusV2TweetDetail,extractStatusV2Android]#,extractStatusV2Rest]
methods=[extractStatusV2Rest_Anon,extractStatusV2,extractStatusV2Rest,extractStatusV2Android]#,extractStatusV2TweetDetail]
for method in methods:
try:
result = method(url,workaroundTokens)