Routing _defaults from yaml configuration overrides format from Route attribute #60309
Unanswered
ian-zunderdorp
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're trying to configure our application to use
json
format by default and override the format for specific routes to be plain text (Prometheus metrics endpoint for example). Our expectation was that using the format parameter in the Route attribute would overwrite the format in the configuration defaults.Configuration (
routes.yaml
):Route attribute:
When calling this route, the response contains the header
Content-Type: application/json
instead of the expectedContent-Type: text/plain
. We can work around this issue by explicitly setting theContent-Type
header on the returnedResponse
, but are wondering whether it is by design that theroutes.yaml
configuration overwrites the Route attribute format parameter.Beta Was this translation helpful? Give feedback.
All reactions