~theonlymrcat/fancy404

Web server that serves randomised 404 pages

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~theonlymrcat/fancy404
read/write
git@git.sr.ht:~theonlymrcat/fancy404

You can also use your local clone with git send-email.

#fancy404

Fancy404 is a web server that serves random 404 pages every request. It also has protection against people trying to find all your 404 pages by refreshing, and will serve a fallback page if it’s handled too many requests in a short time period.

It used to power the 404 pages on my personal website https://mrcat.au. It no longer does, but my site still has plenty of random 404 pages for your enjoyment! (hint hint)

#Building

Fancy404 requires Rust 1.71 or later. It can then be built simply with:

$ cargo build

#Usage

Write a config file like below:

address = "127.0.0.1:13322"
fallback_page = "path/to/fallback.html"

[heat]
base = 1.5
falloff = 1.0
cutoff = 3.0

[[page]]
path = "path/to/page1.html"
weight = 10

[[page]]
path = "path/to/page2.html"
weight = 10

[[page]]
path = "path/to/page3.html"
weight = 1

Save this file to config.toml in the current working directory, then run fancy404 in the same directory.