Skip to content

Commit

Permalink
Remove core_config_result from the final output
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek3255 committed Feb 20, 2024
1 parent 169c594 commit 0477657
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/io/supertokens/config/CoreConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 0477657

Please sign in to comment.