티스토리 뷰

보안점검때 항상 나오는것중 하나.

get, post 를 제외한 method 는 제한해야 한다.



1. APACHE config/httpd.conf 파일을 연다.


1) 추가 - LimitExcept get, post

<Directory />
<LimitExcept GET POST>
Order allow,deny
deny from all
</LimitExcept>
</Directory>


2) 추가 - limit trace

TraceEnable Off




2.  src/main/webapp/WEB-INF/web.xml


1) 추가

    <!-- http method 제한 -->
<security-constraint>
<display-name>Forbidden</display-name>

<web-resource-collection>
<web-resource-name>Protected Context</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>TRACE</http-method>
<http-method>COPY</http-method>
<http-method>MOVE</http-method>
<http-method>OPTIONS</http-method>
</web-resource-collection>

<auth-constraint>
<role-name></role-name>
</auth-constraint>

</security-constraint>


3. 결과

options


trace


'웹개발자 > 웹서버' 카테고리의 다른 글

nginx nodejs 연동  (0) 2019.03.25
라즈베리파이 nginx 설치  (0) 2019.03.25
tomcat 사진파일 업로드 경로 설정  (0) 2017.11.03
tomcat 한글깨짐 utf-8 인코딩 설정  (0) 2017.10.18
윈도우에서 php와 MariaDB 연동  (0) 2016.04.12
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
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
26 27 28 29 30 31
글 보관함