CLI man page:
safesquid-templates(5)safesquid-templates(5)) configures block pages and error bodies served when SafeSquid denies traffic or returns configured errors.
Core mechanics
Resolution order
- Walk configured rows top-down.
- Skip disabled or empty Name.
- Profiles gate must pass (blank = any).
- Case-insensitive Name match — first match wins.
- Else built-in
PAGES[]defaults. - Else log undefined template error.
Template resolution
FILE vs EXECUTABLE
- FILE — Preloaded at config load from Name path or File fallback. MIME blank →
application/octet-stream. - EXECUTABLE — Run at send time; stdout must be HTTP response (
ENABLE_EXTERNALrequired).
Send
The block template uses the caller status or the row Response code. AddsX-SafeSquid-Template header. HTML built-ins may inject stylesheet.
Examples
How to verify
- Trigger block referencing template name.
- DEBUG + TEMPLATE native logs.
- Check
X-SafeSquid-Templateresponse header.

