스프링

 

 

 

보통 서비스할 때는 GET/POST를 많이 사용하기 때문에 잘 사용하지 않는
HTTP Method(PUT, DELETE, OPTIONS, TRACE)는 보안 때문에 막아둔다.

WEB-INF/web.xml
설정파일 최하단에 아래와 같은 코드를 추가한다.

 

<security-constraint>
    <display-name>HTTP Method 비활성화</display-name>
    <web-resource-collection>
        <web-resource-name>Forbidden HTTP Method</web-resource-name>
        <url-pattern>/*</url-pattern>
        <http-method>PUT</http-method>
        <http-method>DELETE</http-method>
        <http-method>OPTIONS</http-method>
        <http-method>TRACE</http-method>
    </web-resource-collection>
    <auth-constraint>
        <role-name></role-name>
    </auth-constraint>
</security-constraint>

 

 

about author

PHRASE

Level 60  라이트

식물은 재배함으로써 자라고 인간은 교육을 함으로써 사람이 된다. -루소

댓글 ( 6)

댓글 남기기

작성