Connection values (such as redis server port and the port to run farside
on) as well as the services json file to use can now be set via
environment variables:
FARSIDE_PORT sets the port for Farside to run on
FARSIDE_REDIS_PORT sets the redis server port for Farside to use
FARSIDE_SERVICES_JSON sets the services json file for Farside to use
This partially addresses the move towards de-listing Cloudflare
instances by default by allowing different services json files to be
used with different redis servers.
See #43
The demo table doesn't include all available services that are supported by
Farside, and likely shouldn't anyways since it already clutters up the readme a
bit. The existing demos should give a good enough idea of how Farside works and
how to use it.
Bibliogram links require a "/u/" prefix when viewing a user's profile,
which does not match Instagram's URL paradigm. This adds a bit of logic
for Bibliogram links to prepend this prefix if the user is not visiting
a post (indicated by a "/p/" prefix, which Bibliogram and Instagram BOTH
use) or the home page of an instance (indicated by an empty path value).
Farside was previously only looking for links containing "youtube.com"
when performing the redirect for full URLs to youtube, which obviously
doesn't work for youtu.be shortened links. This updates the matching
logic to use a regex element for every key in the services map in order
to match against multiple possible domains for each parent service.
Fixes#40
Wikiless updated their instance json with a couple of changes that broke
Farside's auto update workflow:
- The protocol for each instance is now included by default (no need to prepend
"https://")
- The instances are differentiated between regular, onion, and i2p (no need to
check for ".onion" in regular instance URLs)
Query params were not included when using the "/_/" prefix for farside
links. This extracts the logic for parsing query params into a function
that is then used for both /_/ and non-/_/ links.