반응형
java.lang.IllegalArgumentException: An invalid domain [.xxxx.com] was specified for this cookie
과 같이 서브도메인 쿠키 생성시 아래와 같이 처리 해줘야 함.
tomcat context.xml에 다음과 같이 추가
<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor"/>
spring boot embead 일경우
@Bean
public EmbeddedServletContainerCustomizer tomcatCustomizer() {
return container -> {
if (container instanceof TomcatEmbeddedServletContainerFactory) {
TomcatEmbeddedServletContainerFactory tomcat = (TomcatEmbeddedServletContainerFactory) container;
tomcat.addContextCustomizers(context -> context.setCookieProcessor(new LegacyCookieProcessor()));
}
};
}
반응형
'Java' 카테고리의 다른 글
string dateformat validation yyyy-mm-dd (0) | 2022.11.24 |
---|---|
restapi @dateformat (1) | 2022.11.24 |
lombok mapstruct 설정 (0) | 2021.12.15 |
maven resource plugin , org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project homepage: Input length = 1 (0) | 2021.10.07 |
Log4j && Sl4j (0) | 2021.07.05 |