Web.origin.ok: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/web.bend as Web Lines 123-127 of ezmcp@0.1.0.0/src/web.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/web.bend&start_line=123&end_line=127 import Base # whether an Origin is allowed: an absent one (a client that is not a # browser), a page on this machine, or one the server lists def origin.ok(origins: List<&2, String>, +origin: String) -> Bool: origin.or(String.is_empty(origin), _u => origin.or(loopback(origin), _v => origin.listed(origins, origin))) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/web.bend&name=loopback https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/web.bend&name=origin.listed https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/web.bend&name=origin.or