public URI getHttpPublishUri() {
        if (httpPublishUri == null) {
            final URI defaultHttpUri = getDefaultHttpUri();
            LOG.debug("No \"http_publish_uri\" set. Using default <{}>.", defaultHttpUri);
            return defaultHttpUri;
        } else {
            final InetAddress inetAddress = toInetAddress(httpPublishUri.getHost());
            if (Tools.isWildcardInetAddress(inetAddress)) {
                final URI defaultHttpUri = getDefaultHttpUri(httpPublishUri.getPath());
                LOG.warn("\"{}\" is not a valid setting for \"http_publish_uri\". Using default <{}>.", httpPublishUri, defaultHttpUri);
                return defaultHttpUri;
            } else {
                return Tools.normalizeURI(httpPublishUri, httpPublishUri.getScheme(), GRAYLOG_DEFAULT_PORT, httpPublishUri.getPath());
            }
        }
    }
@Test
    public void testHttpPublishUriWildcardKeepsPath() throws RepositoryException, ValidationException {
        final Map<String, String> properties = ImmutableMap.of(
                "http_bind_address", "0.0.0.0:9000",
                "http_publish_uri", "http://0.0.0.0:9000/api/");

        jadConfig.setRepository(new InMemoryRepository(properties)).addConfigurationBean(configuration).process();

        assertThat(configuration.getHttpPublishUri())
                .hasPath("/api/")
                .isNotEqualTo(URI.create("http://0.0.0.0:9000/api/"));
    }