Whew, there's been a lot of work done, and I'm finding it challenging to describe all the changes made while working on v3.
Added
You can override the default XML, JSON, or PlainText response formats using the flags --xml-format, --json-format, or --plaintext-format respectively (or their environment variables)
Support for any HTTP request method to get the error page (previously limited to the GET method only)
The CLI flag --send-same-http-code to respond with the same HTTP code as the requested error page code
The CLI flag --disable-template to disable certain templates (useful when using automatic template rotation to exclude some from the available templates list)
Ability to define custom HTTP codes using placeholders like 4**. Refer to the documentation for more information about --add-http-code
Changed
Users can provide custom templates (themes) using the flag --add-template
Templates are now built into the binary file
To change the template automatically, use the new flag --rotation-mode instead of the previous "magic" template names like i-said-random or random-hourly
Error pages can now be accessed using the following URLs: /{code}, /{code}.html, and /{code}.htm
The default content type is now PlainText. This means that when you curl an error page, you will receive more readable content without tons of HTML tags
Merged the l7-dark and l7-light templates (themes) into a single l7 theme
Templates no longer download resources from external sources; everything is now embedded, including the localization script, which is now inlined into the page. Custom fonts have also been removed
The default value for --proxy-headers is now X-Request-Id,X-Trace-Id,X-Amzn-Trace-Id
CLI flags and environment variables are now well documented, and the readme file automatically syncs with them
The default logs level is warn for Docker image (due to performance reasons), set it to info to get the access logs, if you need
Removed
Configuration file is no longer needed or used. Everything is now managed using CLI flags and environment variables (the --config-file flag was removed)
The matrix template (theme)
The /metrics endpoint
The --default-http-code flag (+ env variable DEFAULT_HTTP_CODE)
The --catch-all flag (+env variable CATCH_ALL)
Closes #156 #176 #219 #274 #285
Checklist
[x] My code adheres to the style guidelines of this project
[x] I have conducted a self-review of my code
[x] I have added comments to my code, especially in areas that may be difficult to understand
[x] I have written unit tests for my code (if tests are required for my changes)
Description
Whew, there's been a lot of work done, and I'm finding it challenging to describe all the changes made while working on v3.
Added
--xml-format
,--json-format
, or--plaintext-format
respectively (or their environment variables)GET
method only)--send-same-http-code
to respond with the same HTTP code as the requested error page code--disable-template
to disable certain templates (useful when using automatic template rotation to exclude some from the available templates list)4**
. Refer to the documentation for more information about--add-http-code
Changed
--add-template
--rotation-mode
instead of the previous "magic" template names likei-said-random
orrandom-hourly
/{code}
,/{code}.html
, and/{code}.htm
l7-dark
andl7-light
templates (themes) into a singlel7
theme--proxy-headers
is nowX-Request-Id,X-Trace-Id,X-Amzn-Trace-Id
warn
for Docker image (due to performance reasons), set it toinfo
to get the access logs, if you needRemoved
--config-file
flag was removed)matrix
template (theme)/metrics
endpoint--default-http-code
flag (+ env variableDEFAULT_HTTP_CODE
)--catch-all
flag (+env variableCATCH_ALL
)Closes #156 #176 #219 #274 #285
Checklist