Apply ApiAuthenticationFilter to /api/* to cover APIs other than GitHub API
1 parent 6e0deb6 commit 3abe398244f67578d4a4a6ef1185a3abfc6a8bb0
@Naoki Takezoe Naoki Takezoe authored on 16 Apr 2018
Showing 1 changed file
View
2
■■■
src/main/scala/ScalatraBootstrap.scala
.addMappingForUrlPatterns(EnumSet.allOf(classOf[DispatcherType]), true, "/git/*")
context.addFilter("apiAuthenticationFilter", new ApiAuthenticationFilter)
context
.getFilterRegistration("apiAuthenticationFilter")
.addMappingForUrlPatterns(EnumSet.allOf(classOf[DispatcherType]), true, "/api/v3/*")
.addMappingForUrlPatterns(EnumSet.allOf(classOf[DispatcherType]), true, "/api/*")
 
// Register controllers
context.mount(new PreProcessController, "/*")