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
Open Configure → Custom Settings → Templates → Manage templates. Row fields are Enabled, Comment, Name, File, Mime type, Response code, Type, and Parsable — the built-inblocked and
error templates ship enabled by default.
Templates — Manage templates rows
How to verify
- Trigger block referencing template name.
- DEBUG + TEMPLATE native logs.
- Check
X-SafeSquid-Templateresponse header.

