code wiki / _hdl_build / nx_apistack_cors.nx
nx_apistack_cors.nx
buildroot/runtime/_hdl_build/nx_apistack_cors.nx
about
nx_apistack_cors.nx -- CAP-API-CORS: cross-origin control for /api. DENY-BY-DEFAULT: an Origin is allowed only if
it matches a row in the allowlist (cors_allow.conf, one origin per line); everything else gets no CORS headers.
Allowlist is DATA (add an origin = a row) -- the sovereign exceed over wildcard/reflected CORS. license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_site_lock_lib.nx
imported by: nx_apistack_cors_gate.nx
structs
| none |
consts
| 6 | const K_MAGIC_65536: i64 = 65536 |
functions
| 8 | func cors_read_file(path: *u8, out: *u8, cap: i64) -> i64 |
| 21 | func cors_allowed(conf_path: *u8, origin: *u8, origin_n: i64) -> i64 |
| 37 | func cors_emit_header(out: *u8, origin: *u8, origin_n: i64) -> i64 called by 1: main |