code: private void setCorsResponseHeaders(ServiceRequestContext ctx, HttpRequest req,
                                          HttpHeaders headers) {
          final CorsPolicy policy = setCorsOrigin(ctx, req, headers);
          if (policy != null) {
              policy.setCorsAllowCredentials(headers);
              policy.setCorsAllowHeaders(headers);
              policy.setCorsExposeHeaders(headers);
          }
      }
docs: Emit CORS headers if origin was found.
  
  @param req the HTTP request with the CORS info
  @param headers the headers to modify