code: public String getPublicHost() {
  
          /** This works in a Heroku like environment. */
          if (System.getenv("PUBLIC_HOST") != null) {
              publicHost = System.getenv("PUBLIC_HOST");
          }
  
          /** This works in a mesosphere like environment. */
          if (System.getenv("HOST") != null) {
              publicHost = System.getenv("HOST");
          }
  
          return publicHost;
      }
docs: Get the public host for service meta generation (Swagger)
  
  @return public host