def cors.is_preflight

emerging-ezhttp@0.21.0.0 · src/cors.bend:265

import emerging-ezhttp@0.21.0.0/src/cors.bend as Cors
import Base
import emerging-ezhttp@0.21.0.0/src/http.bend as Http

265# whether this request is a CORS preflight
266def cors.is_preflight(req: Http.Request) -> Bool:
267  match req:
268    case Http.Bad{why}:
269      False{}
270    case Http.Request{method, target, headers, body}:
271      cors.is_preflight.method(method,
272        Http.headers.find(headers, "access-control-request-method"))

Uses (4)

Used by (1)