diff --git a/distribution/server-dist/src/main/welcome-content/index.html b/distribution/server-dist/src/main/welcome-content/index.html index b88d5b3926..bcf20acc25 100644 --- a/distribution/server-dist/src/main/welcome-content/index.html +++ b/distribution/server-dist/src/main/welcome-content/index.html @@ -20,6 +20,7 @@ Welcome to Keycloak + diff --git a/distribution/server-dist/src/main/welcome-content/robots.txt b/distribution/server-dist/src/main/welcome-content/robots.txt new file mode 100644 index 0000000000..77470cb39f --- /dev/null +++ b/distribution/server-dist/src/main/welcome-content/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file diff --git a/services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java b/services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java index 0294e9c55e..d6d44d4305 100644 --- a/services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java +++ b/services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java @@ -81,6 +81,7 @@ public class KeycloakApplication extends Application { context.setAttribute(KeycloakSessionFactory.class.getName(), this.sessionFactory); singletons.add(new ServerVersionResource()); + singletons.add(new RobotsResource()); singletons.add(new RealmsResource()); singletons.add(new AdminRoot()); classes.add(ThemeResource.class); diff --git a/services/src/main/java/org/keycloak/services/resources/RobotsResource.java b/services/src/main/java/org/keycloak/services/resources/RobotsResource.java new file mode 100755 index 0000000000..16e9393c66 --- /dev/null +++ b/services/src/main/java/org/keycloak/services/resources/RobotsResource.java @@ -0,0 +1,36 @@ +/* + * Copyright 2016 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.keycloak.services.resources; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +@Path("/robots.txt") +public class RobotsResource { + + private static final String robots = "User-agent: *\n" + "Disallow: /"; + + @GET + @Produces(MediaType.TEXT_PLAIN) + public String getRobots() { + return robots; + } + +} diff --git a/themes/src/main/resources/theme/base/account/template.ftl b/themes/src/main/resources/theme/base/account/template.ftl index 3b7dd8059f..c117cffda4 100644 --- a/themes/src/main/resources/theme/base/account/template.ftl +++ b/themes/src/main/resources/theme/base/account/template.ftl @@ -3,6 +3,9 @@ + + + ${msg("accountManagementTitle")} <#if properties.styles?has_content> diff --git a/themes/src/main/resources/theme/base/admin/index.ftl b/themes/src/main/resources/theme/base/admin/index.ftl index 243c79b613..e4db6f94a2 100755 --- a/themes/src/main/resources/theme/base/admin/index.ftl +++ b/themes/src/main/resources/theme/base/admin/index.ftl @@ -2,7 +2,12 @@ + + + + + <#if properties.styles?has_content> <#list properties.styles?split(' ') as style> diff --git a/themes/src/main/resources/theme/base/login/template.ftl b/themes/src/main/resources/theme/base/login/template.ftl index a999fd8f8c..855f40e1de 100755 --- a/themes/src/main/resources/theme/base/login/template.ftl +++ b/themes/src/main/resources/theme/base/login/template.ftl @@ -3,7 +3,10 @@ + + + <#if properties.meta?has_content> <#list properties.meta?split(' ') as meta> diff --git a/themes/src/main/resources/theme/keycloak/welcome/index.ftl b/themes/src/main/resources/theme/keycloak/welcome/index.ftl index 26b3edbbc1..43bec622ae 100755 --- a/themes/src/main/resources/theme/keycloak/welcome/index.ftl +++ b/themes/src/main/resources/theme/keycloak/welcome/index.ftl @@ -24,6 +24,11 @@ Welcome to Keycloak + + + + +