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-disabled404keeps its"Not found"text application payload; - known GET routes answer preflight/unsupported methods with
Allow: GET, HEAD; unknown-path preflight short-circuits to200with noAllow; - 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-HTTPCorsLayerrecomputes itsVaryfrom the configured rules at layer-build time: the empty configuration varies onOrigin, while the configured and allow-all configurations use fixed origins and omit it). The retained native policy keeps conditionalAccess-Control-Allow-Originemission, soVary: originis emitted for configured origins as well to keep the cache key coherent.
Structs§
Functions§
- service
- Create the concrete two-endpoint service. EggServe rejects request bodies before this handler runs and normalizes HEAD framing at the wire boundary.