fix(appconfig): return no content for cached configurations (#6777)

This commit is contained in:
Andre Kurait authored and GitHub committed 2026-10-27 22:00:37 -04:00
1 parent 701b04c410
commit f4ace9ebbe
4 files changed
+93 -3

No files matched your search

@@ -293,6 +293,11 @@ public class AppConfigController {
String clientVersion = uriInfo.getQueryParameters().getFirst("client_configuration_version");
LegacyConfiguration data = dataService.getConfiguration(
appId, envId, configuration, clientId, clientVersion, accept);
if (data.configurationVersion().equals(clientVersion)) {
return Response.noContent()
.header("Configuration-Version", data.configurationVersion())
.build();
}
// A version stored without a content type would otherwise go out as the */* of @Produces.
String contentType = data.contentType() != null ? data.contentType() : MediaType.APPLICATION_OCTET_STREAM;
return Response.ok(data.content())