JBoss.org Community Documentation

- Prev
- Next

## Chapter 33. CORS

RESTEasy has a `ContainerRequestFilter` that can be used to handle CORS preflight and actual requests. `org.jboss.resteasy.plugins.interceptors.CorsFilter`. You must allocate this and register it as a singleton provider from your Application class. See the javadoc or its various settings.

    CorsFilter filter = new CorsFilter();
    filter.getAllowedOrigins().add("http://localhost");

- PrevChapter 32. Content encoding
- Top of page
- Front page
- NextChapter 34. Content-Range Support