써먹는 웹개발
[SpringBoot] Whitelabel Error Page > the request was rejected because the url contained a potentially malicious string ";" 해결방법 본문
Server/Spring Boot
[SpringBoot] Whitelabel Error Page > the request was rejected because the url contained a potentially malicious string ";" 해결방법
kmhan 2022. 12. 26. 14:29728x90
반응형
Spring Boot 에러 Whitelabel Error Page
the request was rejected because the url contained a potentially malicious string ";" 해결방법입니다.
WebSecurityConfigurerAdapter를 상속받은 파일에 16~24번줄 소스 추가
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// ...
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.web.firewall.DefaultHttpFirewall;
import org.springframework.security.web.firewall.HttpFirewall;
@Configuration
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
// ...
}
// ...
// 아래 내용 추가
@Override
public void configure(WebSecurity web) throws Exception {
web.httpFirewall(defaultHttpFirewall());
}
@Bean
public HttpFirewall defaultHttpFirewall() {
return new DefaultHttpFirewall();
}
}
|
cs |
728x90
반응형
'Server > Spring Boot' 카테고리의 다른 글
[SpringBoot] Maven Update했는데 jar파일 누락시 해결한 방법 (0) | 2022.12.09 |
---|---|
[Spring Boot] 배포중에 An exception occurred processing Appender LOG_FILE (0) | 2022.11.29 |
[Spring Boot] STS 빌드관리도구(Gradle/Maven)별 배포방법 차이 (0) | 2022.11.23 |
[Spring Boot] api 호출시에 401에러가 났던 원인과 해결한 방법 (0) | 2022.11.14 |
Comments