캔 사용 시 국가 코드 기록 기능 추가
CloudFront-Viewer-Country 헤더를 통해 국가 코드를 수집하고 캔 사용 내역(UseCan) 저장 시 함께 기록하도록 수정 요청별 국가 정보 관리를 위한 컨텍스트와 인터셉터를 구현
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package kr.co.vividnext.sodalive.configs
|
||||
|
||||
import kr.co.vividnext.sodalive.common.CountryInterceptor
|
||||
import kr.co.vividnext.sodalive.i18n.LangInterceptor
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry
|
||||
@@ -8,10 +9,12 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
|
||||
|
||||
@Configuration
|
||||
class WebConfig(
|
||||
private val langInterceptor: LangInterceptor
|
||||
private val langInterceptor: LangInterceptor,
|
||||
private val countryInterceptor: CountryInterceptor
|
||||
) : WebMvcConfigurer {
|
||||
override fun addInterceptors(registry: InterceptorRegistry) {
|
||||
registry.addInterceptor(langInterceptor).addPathPatterns("/**")
|
||||
registry.addInterceptor(countryInterceptor).addPathPatterns("/**")
|
||||
}
|
||||
|
||||
override fun addCorsMappings(registry: CorsRegistry) {
|
||||
|
||||
Reference in New Issue
Block a user