Set X-Request-ID for the default-backend, too.
This commit is contained in:
parent
ec81605cae
commit
1bef3e75b2
4 changed files with 20 additions and 11 deletions
|
|
@ -34,7 +34,7 @@ const (
|
|||
// FormatHeader name of the header used to extract the format
|
||||
FormatHeader = "X-Format"
|
||||
|
||||
// CodeHeader name of the header used as source of the HTTP statu code to return
|
||||
// CodeHeader name of the header used as source of the HTTP status code to return
|
||||
CodeHeader = "X-Code"
|
||||
|
||||
// ContentType name of the header that defines the format of the reply
|
||||
|
|
@ -55,6 +55,9 @@ const (
|
|||
// ServicePort name of the header that contains the matched Service port in the Ingress
|
||||
ServicePort = "X-Service-Port"
|
||||
|
||||
// Unique ID that identifies the request - same as for backend service
|
||||
RequestId = "X-Request-ID"
|
||||
|
||||
// ErrFilesPathVar is the name of the environment variable indicating
|
||||
// the location on disk of files served by the handler.
|
||||
ErrFilesPathVar = "ERROR_FILES_PATH"
|
||||
|
|
@ -91,6 +94,7 @@ func errorHandler(path string) func(http.ResponseWriter, *http.Request) {
|
|||
w.Header().Set(IngressName, r.Header.Get(IngressName))
|
||||
w.Header().Set(ServiceName, r.Header.Get(ServiceName))
|
||||
w.Header().Set(ServicePort, r.Header.Get(ServicePort))
|
||||
w.Header().Set(RequestId, r.Header.Get(RequestId))
|
||||
}
|
||||
|
||||
format := r.Header.Get(FormatHeader)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue