1. Tomcat 서버 환경
- web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<servlet>
<init-param>
<!-- OPTIONS 요청을 수신할 때 이를 처리하도록 설정 -->
<param-name>dispatchOptionsRequest</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<security-constraint>
<!-- 보안 제약에 대한 이름 -->
<display-name>Forbidden</display-name>
<web-resource-collection>
<web-resource-name>Protected Context</web-resource-name>
<!-- 모든 경로에 대해 보안 제약 적용 -->
<url-pattern>/*</url-pattern>
<!-- 보안 제약이 적용되는 HTTP 메서드를 나열 -->
<http-method>HEAD</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>TRACE</http-method>
<http-method>OPTIONS</http-method>
<http-method>PATCH</http-method>
</web-resource-collection>
<auth-constraint>
<!-- 역할이 없으므로 이 경로에 접근할 수 없음 -->
<role-name></role-name>
</auth-constraint>
</security-constraint>
</web-app>
'Web & WAS Settings > WAS' 카테고리의 다른 글
[ WAS ] URL 리라이팅 (0) | 2024.10.05 |
---|