code: private boolean hasOriginHeader(HttpServletRequest httpReq) {
          String origin = httpReq.getHeader("Origin"); //$NON-NLS-1$
          return origin != null && origin.trim().length() > 0;
      }
docs: Returns true if the Origin request header is present.
  @param httpReq the http servlet request
  @return true if has origin header, else false