mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-08 20:10:54 +01:00
Allow .gif for direct media
This commit is contained in:
parent
8297a56d15
commit
e2f56af1ee
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ export const statusRequest = async (c: Context) => {
|
||||||
|
|
||||||
Also note that all we're doing here is setting the direct flag. If someone
|
Also note that all we're doing here is setting the direct flag. If someone
|
||||||
links a video and ends it with .jpg, it will still redirect to a .mp4! */
|
links a video and ends it with .jpg, it will still redirect to a .mp4! */
|
||||||
if (url.pathname.match(/\/status(es)?\/\d{2,20}\.(mp4|png|jpe?g)/g)) {
|
if (url.pathname.match(/\/status(es)?\/\d{2,20}\.(mp4|png|jpe?g|gifv?)/g)) {
|
||||||
console.log('Direct media request by extension');
|
console.log('Direct media request by extension');
|
||||||
flags.direct = true;
|
flags.direct = true;
|
||||||
} else if (Constants.DIRECT_MEDIA_DOMAINS.includes(url.hostname)) {
|
} else if (Constants.DIRECT_MEDIA_DOMAINS.includes(url.hostname)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue