Add Content-Type to metrics server (#2019)
## Issue Addressed - Resolves #2013 ## Proposed Changes Adds the `Content-Type text/plain` header as per #2013 ## Additional Info NA
This commit is contained in:
parent
075eecdcb1
commit
b8bd80d2fb
@ -116,6 +116,7 @@ pub fn serve<T: BeaconChainTypes>(
|
|||||||
.unwrap_or_else(|e| {
|
.unwrap_or_else(|e| {
|
||||||
Response::builder()
|
Response::builder()
|
||||||
.status(500)
|
.status(500)
|
||||||
|
.header("Content-Type", "text/plain")
|
||||||
.body(format!("Unable to gather metrics: {:?}", e))
|
.body(format!("Unable to gather metrics: {:?}", e))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}),
|
}),
|
||||||
|
@ -123,6 +123,7 @@ pub fn serve<T: EthSpec>(
|
|||||||
.unwrap_or_else(|e| {
|
.unwrap_or_else(|e| {
|
||||||
Response::builder()
|
Response::builder()
|
||||||
.status(500)
|
.status(500)
|
||||||
|
.header("Content-Type", "text/plain")
|
||||||
.body(format!("Unable to gather metrics: {:?}", e))
|
.body(format!("Unable to gather metrics: {:?}", e))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user