From 84c13b8b7e9100b3bb0aae0eb2e1a07a64abe89d Mon Sep 17 00:00:00 2001 From: Brooks Cunningham Date: Tue, 25 Nov 2025 13:44:06 -0600 Subject: [PATCH] Revert "Implement HTTP 103 Early Hints for Swagger UI critical resources" --- src/main.rs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/main.rs b/src/main.rs index bb1f333..6df0b29 100644 --- a/src/main.rs +++ b/src/main.rs @@ -327,9 +327,6 @@ fn status_result(status_u16: u16, mut resp: Response) -> Result /// This is the default handler for the root path `/` and displays /// the OpenAPI documentation interface. /// -/// Uses HTTP 103 Early Hints to preload critical resources before sending -/// the full HTML response, improving page load performance. -/// /// # Arguments /// /// * `resp` - The response object to populate @@ -342,29 +339,6 @@ fn status_result(status_u16: u16, mut resp: Response) -> Result /// /// Returns an error if the KV store lookup fails. fn swagger_ui_html(mut resp: Response) -> Result { - // Send HTTP 103 Early Hints to preload critical resources - // This allows the browser to start fetching these resources - // before the full HTML response is sent - let early_hints = Response::from_status(103) - .with_header( - "Link", - "; rel=preload; as=style", - ) - .with_header( - "Link", - "; rel=preload; as=script", - ) - .with_header( - "Link", - "; rel=preload; as=script", - ) - .with_header( - "Link", - "; rel=preload; as=fetch; crossorigin", - ); - - early_hints.send_to_client(); - // Define a KV store instance using the resource link name let store: KVStore = KVStore::open(KV_STORE_NAME)?.unwrap();