std :: http::cors
Function std::cors_apply_headers
void cors_apply_headers(&HttpResponse resp, const &char allowedOrigin)Adds 'Access-Control-Allow-Origin: <allowedOrigin>' (and '...-Credentials: true' when 'allowedOrigin' isn't "*") to 'resp's headers — call on every response (not just preflights) so the browser accepts the actual response, not just the preflight.