def cors.simple_req

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

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

284# simple CORS from the request Origin
285def cors.simple_req(cfg: Cfg, req: Http.Request, reply: Http.Reply) -> Http.Reply:
286  match req:
287    case Http.Bad{why}:
288      reply
289    case Http.Request{method, target, headers, body}:
290      cors.simple(cfg, Http.headers.find(headers, "origin"), reply)

Uses (5)

Used by (1)