diff --git a/keyring_restful.c b/keyring_restful.c index 9a7d2863..f5db9fc0 100644 --- a/keyring_restful.c +++ b/keyring_restful.c @@ -36,8 +36,6 @@ static HTTP_HANDLER restful_keyring_set; static int restful_keyring_(httpd_request *r, const char *remainder) { r->http.response.header.content_type = CONTENT_TYPE_JSON; - if (!is_rhizome_http_enabled()) - return 403; int ret = authorize_restful(&r->http); if (ret) return ret; diff --git a/server.c b/server.c index ec07ac19..e45da876 100644 --- a/server.c +++ b/server.c @@ -583,6 +583,8 @@ void cf_on_config_change() TIME_MS_NEVER_WILL, now+config.server.config_reload_interval_ms+100); + // Open the Rhizome database immediately if Rhizome is enabled and close it if disabled; this + // cannot be deferred because is_rhizome_http_enabled() only returns true if the database is open. if (config.rhizome.enable){ rhizome_opendb(); RESCHEDULE(&ALARM_STRUCT(rhizome_clean_db), now + 30*60*1000, TIME_MS_NEVER_WILL, TIME_MS_NEVER_WILL);