Skip to content

Pre- And Postprocessors

To throw more efficient redirects or access a specific static asset through an alias, adjust the configuration of your deployment.

Puppets will, instead of redirecting the user, resolve a static asset.

{
...
"preprocessors": {
"puppets": {
"/": "/index.html"
}
}
}
Terminal window
zugriff deploy ... --puppet /:/index.html

Traditional redirects can be configured as follows.

{
...
"preprocessors": {
"redirects": [
{
"status": 308,
"path": "/",
"location": "/index.html"
}
]
}
}
Terminal window
zugriff deploy ... --redirect /:308:/index.html

Similar to puppets, interceptors resolve to a static asset. In contrast to puppets, interceptors run after resolving puppets, static assets, redirects, and functions, and apply only to requests with a dynamic response. (e.g. unspecified static assets and function responses)

{
...
"postprocessors": {
"interceptors": [
{
"status": 404,
"path": "/404.html",
"method": "GET"
}
]
}
}
Terminal window
zugriff deploy ... --intercept 404:GET:/404.html