Change endpoint to /ohttp-configs
This commit is contained in:
parent
2ce5b5fd67
commit
15f8be4227
2 changed files with 1 additions and 12 deletions
|
|
@ -37,15 +37,6 @@ pub async fn get_ohttp_keys(State(state): State<AppState>) -> Result<Response, S
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Legacy endpoint for backward compatibility
|
|
||||||
/// Some older clients may still use /ohttp-configs
|
|
||||||
pub async fn get_legacy_ohttp_configs(
|
|
||||||
State(state): State<AppState>,
|
|
||||||
) -> Result<Response, StatusCode> {
|
|
||||||
// Just forward to the main handler
|
|
||||||
get_ohttp_keys(State(state)).await
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Calculate appropriate cache duration for key configurations
|
/// Calculate appropriate cache duration for key configurations
|
||||||
fn calculate_cache_max_age(state: &AppState) -> u64 {
|
fn calculate_cache_max_age(state: &AppState) -> u64 {
|
||||||
// Cache for 10% of rotation interval, minimum 1 hour, maximum 24 hours
|
// Cache for 10% of rotation interval, minimum 1 hour, maximum 24 hours
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,7 @@ pub fn routes() -> Router<AppState> {
|
||||||
Router::new()
|
Router::new()
|
||||||
// OHTTP endpoints
|
// OHTTP endpoints
|
||||||
.route("/gateway", post(ohttp::handle_ohttp_request))
|
.route("/gateway", post(ohttp::handle_ohttp_request))
|
||||||
.route("/ohttp-keys", get(keys::get_ohttp_keys))
|
.route("/ohttp-configs", get(keys::get_ohttp_keys))
|
||||||
// Legacy endpoints for backward compatibility
|
|
||||||
.route("/ohttp-configs", get(keys::get_legacy_ohttp_configs))
|
|
||||||
// Health and monitoring
|
// Health and monitoring
|
||||||
.route("/health", get(health::health_check))
|
.route("/health", get(health::health_check))
|
||||||
.route("/health/keys", get(keys::key_health_check))
|
.route("/health/keys", get(keys::key_health_check))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue