This change instructs browsers to gradually load images
as the user is scrolling down. This is good for performance
because browsers wont download all images right away.
The website keeps activating the Cloudflare protection even on the "non"
standard URL.
To bypass the Cloudflare protection, the bridge tries to resolve a bucnh
of known subdomains, and check if the IP is in a Cloudflare IP range.
If one of the subdomains has a "non Cloudflare" IP, then we use the
CURL_RESOLVE Curl option to connect the unprotected URL using the real
IP instead of the Cloudflare IP.
I hope this will help the bridge to work without needing a fix every week !
do not fully ignore git directory when building docker images
".git/HEAD" and ".git/refs/heads/*" are required by "getVersion()" in "lib/Configuration.php" to build the version string
This commit fixes following issues:
1. 'Unexpected response' error message was returned, even if upstream did not return anything
2. Inability to handle non-20x messages with checking response body
There are now two og:url values on the page, the first no longer contains the necessary date URL for the bridge to work. Finding the last og:url on the page restores the bridge to working order.
Sometimes, there are some articles that redirected to another site,
cause the bridge to fail.
Also about disable UID, Reuters frequently updated their article and my
feed reader don't update, I think it's maybe its UID.
First option is session_id of existing Instagram account.
Second option is customizing cache timeout for InstagramBridge.
Those options can be combined.
- increase caching from 2 to 4 hours
- using cURL, extract Last-Modified header of app icons and use as item timestamp
Test warning: F-Droid response time is quite slow even on static assets, the additional requests might impact bridge performance further
This is more like a refactor because they dont serve data in plain
html anymore. Instead, the data is available from a json api
at apibay.org
Could possibly expand this bridge because their api has more to give.
I learned about this api by grokking https://thepiratebay.org/static/main.js
and by looking at browser ajax requests.
For some unknown reason they host some static assets at
https://torrindex.net/ which is used by the bridge to render
magnet image and user status image.
Signed-off-by: Dag <me@dvikan.no>