mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(appconfig): return no content for cached configurations (#6777)
This commit is contained in:
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())
|
||||
|
||||
Reference in new issue
Block a user