mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-11 08:07:38 +02:00
control plane: add request id to all error pages (#2149)
* controlplane: add request id to all error pages - use a single http error handler for both envoy and go control plane - add http lib style status text for our custom statuses. Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
91c7dc742f
commit
9215833a0b
7 changed files with 126 additions and 136 deletions
|
@ -4,3 +4,13 @@ package httputil
|
|||
// client's certificate is invalid. This is the same status code used
|
||||
// by nginx for this purpose.
|
||||
const StatusInvalidClientCertificate = 495
|
||||
|
||||
var statusText = map[int]string{
|
||||
StatusInvalidClientCertificate: "a valid client certificate is required to access this page",
|
||||
}
|
||||
|
||||
// StatusText returns a text for the HTTP status code. It returns the empty
|
||||
// string if the code is unknown.
|
||||
func StatusText(code int) string {
|
||||
return statusText[code]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue