Skip to main content

Module http

Module http 

Source
Expand description

The snip-sync health and metrics HTTP control surface.

Wire parity with the pre-migration Axum/Tower-HTTP server (proven by exercising parent commit c1c77a8 over real sockets):

  • router fallback/method responses are empty with no application content-type (404/405, content-length: 0); the metrics-disabled 404 keeps its "Not found" text application payload;
  • known GET routes answer preflight/unsupported methods with Allow: GET, HEAD; unknown-path preflight short-circuits to 200 with no Allow;
  • preflight responses carry CORS metadata but never the ordinary security headers; ordinary responses always carry the three security headers;
  • every non-allow-all response carries Vary: origin (the historical Tower-HTTP CorsLayer recomputes its Vary from the configured rules at layer-build time: the empty configuration varies on Origin, while the configured and allow-all configurations use fixed origins and omit it). The retained native policy keeps conditional Access-Control-Allow-Origin emission, so Vary: origin is emitted for configured origins as well to keep the cache key coherent.

Structs§

CorsPolicy

Functions§

service
Create the concrete two-endpoint service. EggServe rejects request bodies before this handler runs and normalizes HEAD framing at the wire boundary.