Go to file
2024-06-23 23:48:51 +04:00
.github fix(ci): Disable cache for setup-node github action 2024-06-20 14:16:57 +04:00
cmd/error-pages wip: 🔕 temporary commit 2024-06-21 17:13:27 +04:00
internal wip: 🔕 temporary commit 2024-06-23 23:48:51 +04:00
l10n Fix spanish translated tags (#237) 2023-10-10 15:10:11 +04:00
schemas Go templates support, XML, JSON, Ingress (#49) 2022-01-27 17:29:49 +05:00
templates wip: 🔕 temporary commit 2024-06-22 03:32:10 +04:00
.dockerignore wip: 🔕 temporary commit 2024-06-23 16:12:06 +04:00
.editorconfig chore(docker): The docker env re-written 2024-06-20 23:09:32 +04:00
.gitignore wip: 🔕 temporary commit 2024-06-21 17:13:27 +04:00
.golangci.yml wip: 🔕 temporary commit 2024-06-21 17:13:27 +04:00
CHANGELOG.md build(deps): bump golangci/golangci-lint-action from 3 to 4 (#268) 2024-03-16 16:46:45 +00:00
docker-compose.yml wip: 🔕 temporary commit 2024-06-23 16:12:06 +04:00
Dockerfile wip: 🔕 temporary commit 2024-06-23 16:12:06 +04:00
error-pages.yml New template orient added (#190) 2023-04-17 15:06:28 +04:00
go.mod wip: 🔕 temporary commit 2024-06-23 00:05:11 +04:00
go.sum wip: 🔕 temporary commit 2024-06-21 17:13:27 +04:00
LICENSE Basic repo files added 2020-07-08 16:12:21 +05:00
Makefile wip: 🔕 temporary commit 2024-06-21 17:13:27 +04:00
README.md wip: 🔕 temporary commit 2024-06-23 23:48:51 +04:00

CLI interface

Usage:

$ error-pages [GLOBAL FLAGS] [COMMAND] [COMMAND FLAGS] [ARGUMENTS...]

Global flags:

Name Description Default value Environment variables
--log-level="…" logging level (debug/info/warn/error/fatal) info LOG_LEVEL
--log-format="…" logging format (console/json) console LOG_FORMAT

serve command (aliases: s, server, http)

Start HTTP server.

Usage:

$ error-pages [GLOBAL FLAGS] serve [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Default value Environment variables
--listen="…" (-l) IP (v4 or v6) address to listen on 0.0.0.0 LISTEN_ADDR
--port="…" (-p) TCP port number 8080 LISTEN_PORT
--add-template="…" to add a new template, provide the path to the file using this flag (the filename without the extension will be used as the template name) [] none
--add-http-code="…" to add a new HTTP status code, provide the code and its message/description using this flag (the format should be '%code%=%message%/%description%'; the code may contain a wildcard '*' to cover multiple codes at once, for example, '4**' will cover all 4xx codes, unless a more specific code was described previously) map[] none
--json-format="…" override the default error page response in JSON format (Go templates are supported) RESPONSE_JSON_FORMAT
--xml-format="…" override the default error page response in XML format (Go templates are supported) RESPONSE_XML_FORMAT
--template-name="…" (-t) name of the template to use for rendering error pages template-1 TEMPLATE_NAME
--disable-l10n disable localization of error pages (if the template supports localization) false DISABLE_L10N
--default-error-page="…" the code of the default (index page, when a code is not specified) error page to render 404 DEFAULT_ERROR_PAGE
--send-same-http-code the HTTP response should have the same status code as the requested error page (by default, every response with an error page will have a status code of 200) false SEND_SAME_HTTP_CODE
--show-details show request details in the error page response (if supported by the template) false SHOW_DETAILS
--proxy-headers="…" listed here HTTP headers will be proxied from the original request to the error page response (comma-separated list) X-Request-Id,X-Trace-Id,X-Amzn-Trace-Id PROXY_HTTP_HEADERS
--rotation-mode="…" templates automatic rotation mode (disabled/random-on-startup/random-on-each-request/random-daily/random-hourly) disabled TEMPLATES_ROTATION_MODE

healthcheck command (aliases: chk, health, check)

Health checker for the HTTP server. The use case - docker health check.

Usage:

$ error-pages [GLOBAL FLAGS] healthcheck [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Default value Environment variables
--port="…" (-p) TCP port number 8080 LISTEN_PORT