Commit Graph

29 Commits

Author SHA1 Message Date
decoy-walrus 4cdb8f78cb Add new endpoint for original resolution images
This change is to work around the issue that chromium based browsers have handling the "name=orig" parameter appended to URLs. This parameter is needed to retrieve the full resolution image from twitter, but causes those browsers to fill in "jpg_name=orig" as the extension on the filename.

This change adds a new endpoint, "/pic/orig/<encoded media>". This new endpoint will internally fetch the URL with ":orig" appended on the end for the full res image. Externally, the endpoint will serve the image without the extra parameter to expose the real extension to the browser.

This new endpoint is used when rendering tweets with attached images. The old endpoint is still in place for all other proxied images, and for any legacy links.

I also updated the "?name=small" parameter to ":small" since that seems to be the new pattern for image sizing.

This should fix issue #458.
2022-02-07 16:21:20 -05:00
Zed 6c6386913e Remove nim-regex dependency, improve performance 2022-01-11 03:22:31 +01:00
Zed 74c4377198 More cleanup 2022-01-02 11:21:03 +01:00
Zed 9dd7419ecf Cleanup 2022-01-02 07:02:02 +01:00
Zed eed4d4033f Add canonical header to help search engines
Fixes #472
2021-12-30 04:17:58 +01:00
Zed 73b5b60ac3 Add license headers
Closes #413
2021-12-27 02:37:38 +01:00
Zed bde3c3662d Silence some warnings 2020-06-22 03:50:16 +02:00
Zed 310c5e936d Optional base64 support for proxy urls 2020-06-09 15:22:58 +02:00
Zed 47c87f7068 Strip https://pbs.twimg.com from image urls 2020-06-07 07:55:57 +02:00
Zed 68a5ac20b6 Proxy media instead of using file cache 2020-06-06 04:39:22 +02:00
Zed 2fa76db099 Simplify error parser 2020-06-02 18:05:54 +02:00
Zed 81d6d1ac7f Misc. changes 2020-06-02 18:05:54 +02:00
Zed 973ba585c7 Detect ?format=jpg/png images
Fixes #112
2020-01-19 09:01:11 +01:00
Zed 2c6d2897ae Add experimental infinite scroll 2020-01-07 03:00:16 +01:00
Zed e91e7bcc1e Add hmacKey config field for video signing 2019-10-24 00:17:38 +02:00
Zed 453beff09d Fix wrong png mimetypes 2019-10-21 08:31:02 +02:00
Zed 4104bfcba9 Fix more wrong mimetypes 2019-10-21 07:49:43 +02:00
Zed 030d649300 Proper mimetype fix 2019-10-21 07:33:45 +02:00
Zed 147f16a262 Fix wrong mimetypes for images 2019-10-21 07:22:24 +02:00
Zed cfcd471ffc Use sendFile, refactor mimetypes 2019-10-21 05:55:18 +02:00
Zed f801d7f79c Filter "referer" param from path to avoid nesting 2019-10-08 13:13:53 +02:00
Zed 9e3138e51b Add list support 2019-09-21 01:08:30 +02:00
Zed 02e7b1dcab Fix invalid path bug 2019-09-20 01:52:08 +02:00
Zed 9c91688497 Restrict image/gif media host instead of hashing 2019-09-13 12:27:04 +02:00
Zed c7a2387aeb Fix banner triggering download with Firefox 2019-09-08 01:43:54 +02:00
Zed 1e55f21fa5 Use referer form data instead of relying on header 2019-09-05 22:40:36 +02:00
Zed 096471b50d Update todo list 2019-06-23 14:34:19 +02:00
Zed d070e76e1a Add simple file cache (no auto deletion yet) 2019-06-23 02:52:00 +02:00
Zed cea5cc0523 Initial commit 2019-06-20 16:16:20 +02:00