JBoss.org Community Documentation

- Prev
- Next

## Chapter 30. 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 29. GZIP Compression/Decompression
- Top of page
- Front page
- NextChapter 31. Content-Range Support