Change endpoint to /ohttp-configs

This commit is contained in:
Bastian Gruber 2025-07-22 17:44:43 +02:00
parent 2ce5b5fd67
commit 15f8be4227
No known key found for this signature in database
GPG key ID: D2DF996A188CFBA2
2 changed files with 1 additions and 12 deletions

View file

@ -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
fn calculate_cache_max_age(state: &AppState) -> u64 {
// Cache for 10% of rotation interval, minimum 1 hour, maximum 24 hours

View file

@ -12,9 +12,7 @@ pub fn routes() -> Router<AppState> {
Router::new()
// OHTTP endpoints
.route("/gateway", post(ohttp::handle_ohttp_request))
.route("/ohttp-keys", get(keys::get_ohttp_keys))
// Legacy endpoints for backward compatibility
.route("/ohttp-configs", get(keys::get_legacy_ohttp_configs))
.route("/ohttp-configs", get(keys::get_ohttp_keys))
// Health and monitoring
.route("/health", get(health::health_check))
.route("/health/keys", get(keys::key_health_check))