apache-tomcat에서 불필요한 http method 제거 방법

개발/WEB/WAS2012. 6. 18. 08:30
728x90

요즘에 보안에 대해서 민감하기 때문에 최대한 보안에 문제되는 점은 사전에 점검한다.

HTTP method 중에 PUT, DELETE, TRACE, OPTIONS 등 불필요하기에 제거하는 게 좋다.

apache / apache-tomcat의 설정이 조금 다르다.

apache-tomcat의 경우 web.xml에 다음과 같이 설정해 주면 된다.


<security-constraint>

        <display-name>Forbidden</display-name>

            <web-resource-collection>

                <web-resource-name>Forbidden</web-resource-name>

                    <url-pattern>/*</url-pattern>

                    <http-method>PUT</http-method>

                    <http-method>DELETE</http-method>

                    <http-method>TRACE</http-method>

                    <http-method>OPTIONS</http-method>

            </web-resource-collection>

          <auth-constraint>

                <role-name></role-name>

          </auth-constraint>

</security-constraint>

728x90

작성자

Posted by 일퍼센트

관련 글

댓글 영역