handler: Handle any checkpoint resource, determine Content-Type with libmagic (#22)

* Handle any resource

* Determine Content-Type for static files with libmagic

---------

Co-authored-by: Vaxry <vaxry@vaxry.net>
This commit is contained in:
catfromplan9
2025-04-21 19:28:31 +00:00
committed by GitHub
parent f199569ff8
commit 5b2744584a
3 changed files with 40 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ If you are using this, it's almost certain search engines will stop indexing you
## Setup guide
1. Clone and build this repo. You will need `openssl`, `g++>=12`, `re2`, and deps for `pistache`, `fmt` and `tinylates`.
1. Clone and build this repo. You will need `openssl`, `g++>=12`, `re2`, `libmagic`, and deps for `pistache`, `fmt` and `tinylates`.
2. Create a `config.jsonc`. An example one is in `example/`.
3. Adjust the config to your needs. Options are documented with comments in the example config.
4. Set up your IP rules if you want. These allow you to set up IPs that are automatically blocked, or allowed to access without a challenge. This is useful for e.g. search engine scrapers. Some IP ranges can be found in `example/index_bots.jsonc`.