Cors.cors.preflight_req: def of emerging-ezhttp@0.21.0.0 Import: import emerging-ezhttp@0.21.0.0/src/cors.bend as Cors Lines 274-282 of emerging-ezhttp@0.21.0.0/src/cors.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.21.0.0/src/cors.bend&start_line=274&end_line=282 import Base import emerging-ezhttp@0.21.0.0/src/http.bend as Http # preflight from the request's CORS headers def cors.preflight_req(cfg: Cfg, req: Http.Request) -> Http.Reply: match req: case Http.Bad{why}: Http.Reply{400, [], why} case Http.Request{method, target, +headers, body}: cors.preflight(cfg, Http.headers.find(headers, "origin"), Http.headers.find(headers, "access-control-request-method"), Http.headers.find(headers, "access-control-request-headers")) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/cors.bend&name=Cfg https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/cors.bend&name=cors.preflight https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=Reply https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=Request https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=headers.find