`user: nobody`: the least privileged account.
`read_only: true`: this container doesn't write anything to the filesystem, this removes a vector.
`security_opt`: disallows the container to grab more privileges.
`cap_drop`: this container doesn't need any capabilities, drop them.
`networks`: put `libreddit` into its own network so it cannot see other containers by default.
If we can't retrieve subreddit name, just use the user-supplied name.
This fixes banned subreddits being impossible to to unfilter or
unsubscribe from.
A drawback of such approach is that it might be possible to subscribe to
a subreddit twice with different casing, however the chance of this is
extremely low.
* Fix gated communities being unviewable by treating them as quarantined
* Show restriction reason in quarantine template
* Add `gated` checks for other requests
Making a new connection on every request is very slow and wasteful, espectially on slower network.
Fix this by reuse a hyper client which shares a connection pool.
I'm able to lower /r/popular loading time from 5s to 1.5s on my machine.
Addresses the following layout bugs in mobile view:
* improper rendering of award images on posts
* upvote ratio no longer appearing on bottom-right corner of post as
before
* Reddit warning pop-up background cut off at bottom of page
Fixes#713.
This allows GitHub Linguist to generate slightly more accurate language
stats for this repository, and also enable syntax highlighting in the
GitHub web UI. Due to caching, it may take a few days for this change to
have a visible effect on github.com.
This simplifies the logic to build the listener by using more clap
features instead of manually accessing the PORT environment variable.
This also removes unnecessary `unwrap_or` calls that set defaults that
are already set by clap.