Skip to content

Commit

Permalink
feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
juliocavalin-lp committed Apr 10, 2024
1 parent 6d896db commit 10f4cf9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion feature-flag.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,9 @@ void feature_flag_save(const struct feature_flag *feature_flag, unsigned const c
}

void feature_flag_load(struct feature_flag *feature_flag, unsigned const char key[KDF_HASH_LEN]) {
feature_flag->url_encryption_enabled = !strcmp(config_read_encrypted_string("session_ff_url_encryption", key), "1");
char * ff_url_encryption = config_read_encrypted_string("session_ff_url_encryption", key);

if (ff_url_encryption != NULL) {
feature_flag->url_encryption_enabled = !strcmp(ff_url_encryption, "1");
}
}

0 comments on commit 10f4cf9

Please sign in to comment.