document raw

This commit is contained in:
slonkazoid 2024-12-26 19:39:37 +03:00
parent 5736765e63
commit 70d035c410
Signed by: slonk
SSH key fingerprint: SHA256:tbZfJX4IOvZ0LGWOWu5Ijo8jfMPi78TU7x1VoEeCIjM

View file

@ -117,6 +117,7 @@ you MAY set these variables:
- `TAGS` (as an array!) - `TAGS` (as an array!)
- `DONT_CACHE` (to explicitly not cache the rendered blag) - `DONT_CACHE` (to explicitly not cache the rendered blag)
- `WRITTEN_AT` (if the filesystem/libc doesn't support it) - `WRITTEN_AT` (if the filesystem/libc doesn't support it)
- `RAW` (see [raw responses](#raw_responses))
you SHOULD NOT set `MODIFIED_AT` unless you have a valid reason. you SHOULD NOT set `MODIFIED_AT` unless you have a valid reason.
@ -129,6 +130,13 @@ safely use `jq` to parse it.
the rest is normal the rest is normal
### raw responses
if you set `RAW` to a non-empty value, bingus-blog will abort normal
function and instead respond with whatever your script outputted, setting
the Content-Type header to the value of `RAW`. this can be used to implement
APIs in blag (do not do this).
### cache invalidation ### cache invalidation
due to how blag works, the hash of the query params is stored alongside the due to how blag works, the hash of the query params is stored alongside the