You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disallow all extensions in actuator endpoints (except .json)
Along with the recent change in Spring to use content-disposition
"inline" (which prevents the download), it also makes sense to limit
the extensions allowed by the actuator endpoints. Really there *is*
no extension for these endpoints, but since all of them explicitly
produce JSON we can add .json for browsers as a convenience in case
the app would otherwise choose to send XML.
Fixesgh-4402
Copy file name to clipboardExpand all lines: spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointHandlerMapping.java
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,7 @@ public EndpointHandlerMapping(Collection<? extends MvcEndpoint> endpoints,
84
84
// By default the static resource handler mapping is LOWEST_PRECEDENCE - 1
85
85
// and the RequestMappingHandlerMapping is 0 (we ideally want to be before both)
Copy file name to clipboardExpand all lines: spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpointIntegrationTests.java
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,22 @@ public void jsonResponsesCanBeIndentedWhenSpringDataRestIsAutoConfigured()
0 commit comments