libreddit/src
Daniel Valentine c6487799ed
Redirect /:id to canonical URL for post. (#617)
* Redirect /:id to canonical URL for post.

This implements redirection of `/:id` (a short-form URL to a post) to
the post's canonical URL. Libreddit issues a `HEAD /:id` to Reddit to get
the canonical URL, and on success will send an HTTP 302 to a client with
the canonical URL set in as the value of the `Location:` header.

This also implements support for short IDs for non-ASCII posts, c/o
spikecodes.

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2022-11-05 02:29:04 -06:00
..
client.rs Redirect /:id to canonical URL for post. (#617) 2022-11-05 02:29:04 -06:00
main.rs Redirect /:id to canonical URL for post. (#617) 2022-11-05 02:29:04 -06:00
post.rs Switch Reveddit to Unddit 2022-10-31 22:30:31 -07:00
search.rs Fix HTML encoding in templating (#404) 2022-05-21 05:28:31 +00:00
server.rs HTTP compression (Reddit -> Libreddit -> client) (#612) 2022-11-03 22:04:34 -06:00
settings.rs Filter subreddits and users (#317) 2021-11-26 04:02:04 +00:00
subreddit.rs Fix HTML encoding in templating (#404) 2022-05-21 05:28:31 +00:00
user.rs Fix HTML encoding in templating (#404) 2022-05-21 05:28:31 +00:00
utils.rs Redirect /:id to canonical URL for post. (#617) 2022-11-05 02:29:04 -06:00