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 \
|
--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
|
--enable-libx264 --enable-libsvtav1 --disable-ffplay
|
||||||
|
|
||||||
RUN make -j
|
RUN make -j 8
|
||||||
|
|
||||||
FROM public.ecr.aws/lambda/python:3.12
|
FROM public.ecr.aws/lambda/python:3.12
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ def lambda_handler(event, context):
|
|||||||
"headers":
|
"headers":
|
||||||
{
|
{
|
||||||
"Content-Type": "image/avif",
|
"Content-Type": "image/avif",
|
||||||
|
"Cache-Control": "public, max-age=604800, immutable"
|
||||||
},
|
},
|
||||||
'body': encoded_string,
|
'body': encoded_string,
|
||||||
'isBase64Encoded': True
|
'isBase64Encoded': True
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ def fixTweetData(tweet):
|
|||||||
|
|
||||||
def extractStatus(url,workaroundTokens=None):
|
def extractStatus(url,workaroundTokens=None):
|
||||||
# TODO: commented out methods are too slow/unreliable at the moment
|
# 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:
|
for method in methods:
|
||||||
try:
|
try:
|
||||||
result = method(url,workaroundTokens)
|
result = method(url,workaroundTokens)
|
||||||
|
|||||||
Reference in New Issue
Block a user