이 .htaccess 줄에 __Secure 접두사를 어떻게 추가합니까?

이 .htaccess 줄에 __Secure 접두사를 어떻게 추가합니까?

죄송합니다. 저는 Apache 전문가가 아닙니다.

__Secure이 htaccess 줄에 접두사를 추가해야 합니다 .

Header onsuccess edit Set-Cookie (.*) "$1; SameSite=Strict; Secure"

이것이 가능한가? 어떻게?

답변1

원래 응답

이는 귀하에게 필요한 정보를 제공합니까?

https://geekflare.com/httponly-secure-cookie-apache/

Apache의 구현 절차

  • mod_headers.soApache HTTP 서버에서 활성화 했는지 확인하십시오.

  • 다음 항목을 다음에 추가하십시오 httpd.conf.

    Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
    
  • 테스트하려면 Apache HTTP 서버를 다시 시작하세요.

업데이트 2022-12-21 @ 20:58GMT

에 대한 지침이것사이트는 형식을 나타냅니다.Set-Cookie: __Secure-ID=123; Secure; Domain=example.com; HttpOnly

또한 다음MDN 구문, 귀하의 예에서 다음이 필요하다고 예상합니다.

Header onsuccess edit Set-Cookie (.*) "__Secure-$1; SameSite=Strict; Secure"

; HttpOnly마지막에 강력한 텍스트를 추가할 수도 있습니다 .

Header onsuccess edit Set-Cookie (.*) "__Secure-$1; SameSite=Strict; Secure; HttpOnly"

관련 정보