From 54edebaa1ec2d6fa878b43aa1ac790b57705ecef Mon Sep 17 00:00:00 2001 From: Prateek Surana Date: Thu, 8 Feb 2024 12:50:11 +0530 Subject: [PATCH] Remove core_config_result from the final output --- src/main/java/io/supertokens/config/CoreConfig.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/supertokens/config/CoreConfig.java b/src/main/java/io/supertokens/config/CoreConfig.java index 6be384eaf..d7f91a48b 100644 --- a/src/main/java/io/supertokens/config/CoreConfig.java +++ b/src/main/java/io/supertokens/config/CoreConfig.java @@ -652,7 +652,6 @@ void normalizeAndValidate(Main main, boolean includeConfigFilePath) throws Inval throw new InvalidConfigException("log_level field not found"); } - // Normalize if (ip_allow_regex != null) { ip_allow_regex = ip_allow_regex.trim(); @@ -802,8 +801,10 @@ public static JsonArray getConfigFieldsJson(Main main) { Field field = CoreConfig.class.getDeclaredField(fieldId); // If fieldId exists in PROTECTED_CONFIGS or is not annotated with JsonProperty // or is annotated with ConfigYamlOnly, then skip - if (Arrays.asList(PROTECTED_CONFIGS).contains(fieldId) || !field.isAnnotationPresent(JsonProperty.class) - || field.isAnnotationPresent(ConfigYamlOnly.class)) { + if (Arrays.asList(PROTECTED_CONFIGS).contains(fieldId) + || !field.isAnnotationPresent(JsonProperty.class) + || field.isAnnotationPresent(ConfigYamlOnly.class) + || fieldId == "core_config_version") { continue; } JsonObject fieldJson = new JsonObject();