Add cache headers
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user