def cors.simple.skip
import ezhttp@0.22.0.0/src/cors.bend as Corsimport Base
import ezhttp@0.22.0.0/src/http.bend as Http
225# leave a reply alone when there is nothing to add
226def cors.simple.skip(add: Bool, reply: Http.Reply, hs: List<&2, Http.Header>)
227 -> Http.Reply:
228 match add reply:
229 case False{} r:
230 r
231 case True{} Http.Torn{why}:
232 Http.Torn{why}
233 case True{} Http.Reply{status, headers, body}:
234 Http.Reply{status, List.append(&2, Http.Header, hs, headers), body}