}
private static void handlePreflight(final ChannelHandlerContext ctx, final CorsMetadata md,
final HttpRequest request) {
final HttpResponse response = new DefaultHttpResponse(request.getProtocolVersion(), NO_CONTENT);
final HttpHeaders headers = response.headers();
headers.set(CONTENT_TYPE, Transports.CONTENT_TYPE_PLAIN);
headers.set(CACHE_CONTROL, "max-age=31536000, public");
headers.set(ACCESS_CONTROL_ALLOW_ORIGIN, md.origin());
headers.set(ACCESS_CONTROL_ALLOW_CREDENTIALS, "true");
headers.set(ACCESS_CONTROL_MAX_AGE, "31536000");