Merge pull request #680 from patriot1burke/master

nolog CORS exception
This commit is contained in:
Bill Burke 2014-09-09 12:54:55 -04:00
commit b771cd30e7

View file

@ -3,6 +3,7 @@ package org.keycloak.services.resources.admin;
import org.jboss.logging.Logger;
import org.jboss.resteasy.spi.HttpRequest;
import org.jboss.resteasy.spi.HttpResponse;
import org.jboss.resteasy.spi.NoLogWebApplicationException;
import org.jboss.resteasy.spi.NotFoundException;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.jboss.resteasy.spi.UnauthorizedException;
@ -181,7 +182,7 @@ public class AdminRoot {
if (request.getHttpMethod().equalsIgnoreCase("OPTIONS")) {
logger.debug("Cors admin pre-flight");
Response response = Cors.add(request, Response.ok()).preflight().allowedMethods("GET", "PUT", "POST", "DELETE").auth().build();
throw new WebApplicationException(response);
throw new NoLogWebApplicationException(response);
}
AdminAuth auth = authenticateRealmAdminRequest(headers);