def cors.route

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

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

292# preflight, or CORS headers on the handler reply
293def cors.route(cfg: Cfg, req: Http.Request, +reply: Http.Reply, pre: Bool)
294  -> Http.Reply:
295  match pre:
296    case True{}:
297      cors.preflight_req(cfg, req)
298    case False{}:
299      cors.simple_req(cfg, req, reply)

Uses (6)

Used by (1)