[WAS] Apache samesite 설정

김봉남·2024년 1월 23일

WAS

목록 보기
10/23
post-thumbnail

Apache samesite

SameSite는 쿠키의 보안 및 개인정보 보호 측면에서 중요한 설정

Apache samesite 설정 예시

Header always edit Set-Cookie ^(.*)$ $1;SameSite=Strict
Header always edit Set-Cookie ^(.*)$ $1;SameSite=None;Secure
  • Strict: SameSite Strict는 SameSite 속성을 엄격하게 적용, 이 옵션은 쿠키가 제 3자 사이트로 전송되지 않도록 합니다. 즉, 쿠키는 해당 도메인의 요청에만 제한됩니다.

  • Lax: SameSite Lax는 제 3자 사이트로의 쿠키 전송을 완화시킵니다. 하지만 제 3자 사이트에서 안전하지 않은 HTTP GET 요청으로는 전송되지 않습니다. 즉, 외부 도메인에서는 일부 제한이 적용됩니다.

  • None: SameSite None은 쿠키가 모든 도메인으로 전송되도록 허용합니다. 이 설정은 Secure 속성이 함께 사용되는 경우에만 유효하며, HTTPS 연결에서만 동작합니다.

Apache samesite 설정

###########################################
# 'VirtualHost' configration
###########################################
NameVirtualHost 00.00.00.00:19134

<VirtualHost 00.00.00.00:19134>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "/home2/test/www"
    ServerName 00.00.00.00:19134

    ErrorLog "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_error_log.%Y%m%d 86400 +540"
    CustomLog "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_access_log.%Y%m%d 86400 +540" combined


Header always edit Set-Cookie ^(.*)$ $1;SameSite=None;Secure
profile
남자다

0개의 댓글