Skip to content

vow-cors

vow-cors configures CORS options, detects OPTIONS preflight, and sets Access-Control-Allow-Origin headers. Install with vpm:

Terminal window
curl -fsSL https://install.vowlang.dev | sh
export PATH="$HOME/.local/bin:$PATH"
vpm add vow-cors vow-web-server
vpm install
import vc from vow_cors
fn main(caps: Caps) -> int {
let opts = vc.defaults("https://app.example.com");
print vc.allow_origin(opts);
return 0;
}
Terminal window
cd vow-libs/vow-cors && vow test tests/cors.vow