To know if the gate should be bypassed, we check if the link contains
the pasameter instead of checking if the link ends with it. This is
impostant, for example if we were to implement searching for comments
within a post. If we wanted to search for comments within a post that we
have bypassed the gate to view: the link will look like
https://libreddit-instance/r/somesub/comments/post-id/post-title&bypass_nsfw_landing/?q=some-query&type=comment
`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.