Upgraded to Undertow 1.0.0.Beta21 - this fixes an issue with '/admin/' not opening in Chrome

This commit is contained in:
Stian Thorgersen 2013-11-11 15:17:41 +00:00
parent 5b19e34f50
commit c8a3b82fdf
2 changed files with 21 additions and 3 deletions

View file

@ -10,7 +10,7 @@
<properties>
<resteasy.version>3.0.5.Final</resteasy.version>
<undertow.version>1.0.0.Beta12</undertow.version>
<undertow.version>1.0.0.Beta21</undertow.version>
<picketlink.version>2.5.0.Beta6</picketlink.version>
<mongo.driver.version>2.11.2</mongo.driver.version>
<jboss.logging.version>3.1.1.GA</jboss.logging.version>

View file

@ -26,6 +26,7 @@ import io.undertow.Undertow.Builder;
import io.undertow.server.handlers.resource.FileResource;
import io.undertow.server.handlers.resource.FileResourceManager;
import io.undertow.server.handlers.resource.Resource;
import io.undertow.server.handlers.resource.ResourceChangeListener;
import io.undertow.server.handlers.resource.ResourceManager;
import io.undertow.server.handlers.resource.URLResource;
import io.undertow.servlet.Servlets;
@ -261,8 +262,7 @@ public class KeycloakServer {
di.setDeploymentName("Keycloak");
di.setResourceManager(new KeycloakResourceManager(config.getResourcesHome()));
Set<String> allowed = new HashSet<String>(Arrays.asList(new String[]{"js", "css", "png", "jpg", "gif", "html", "svg", "ico"}));
di.setDefaultServletConfig(new DefaultServletConfig(false, allowed));
di.setDefaultServletConfig(new DefaultServletConfig(true));
di.addWelcomePage("index.html");
FilterInfo filter = Servlets.filter("SessionFilter", KeycloakSessionServletFilter.class);
@ -326,6 +326,24 @@ public class KeycloakServer {
return new FileResource(file, new FileResourceManager(file.getParentFile(), 1), path);
}
}
@Override
public boolean isResourceChangeListenerSupported() {
return false;
}
@Override
public void registerResourceChangeListener(ResourceChangeListener listener) {
}
@Override
public void removeResourceChangeListener(ResourceChangeListener listener) {
}
@Override
public void close() throws IOException {
}
}
private static File file(String... path) {