Created
October 2, 2014 20:59
-
-
Save DmitryVarennikov/24b127a6cbeae49fb48b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cuenation.api; | |
import org.springframework.boot.context.embedded.FilterRegistrationBean; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.web.filter.ShallowEtagHeaderFilter; | |
import javax.servlet.DispatcherType; | |
import java.util.EnumSet; | |
@Configuration | |
public class WebConfig { | |
@Bean | |
public FilterRegistrationBean shallowEtagHeaderFilter() { | |
FilterRegistrationBean registration = new FilterRegistrationBean(); | |
registration.setFilter(new ShallowEtagHeaderFilter()); | |
registration.setDispatcherTypes(EnumSet.allOf(DispatcherType.class)); | |
registration.addUrlPatterns("/cue-categories"); | |
return registration; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment