¿Cómo agrego el prefijo __Secure en esta línea .htaccess?

¿Cómo agrego el prefijo __Secure en esta línea .htaccess?

Lo siento, no soy un experto en Apache.

Necesito agregar el __Secureprefijo a esta línea htaccess:

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

¿es posible? ¿Cómo?

Respuesta1

RESPUESTA ORIGINAL

¿Esto le brinda la información que necesita?

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

Procedimiento de implementación en Apache

  • Asegúrese de haberlo mod_headers.sohabilitado en el servidor HTTP Apache

  • Agregue la siguiente entrada en httpd.conf:

    Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
    
  • Reinicie el servidor HTTP Apache para probar

ACTUALIZACIÓN 2022-12-21 @ 20:58GMT

Orientación sobreesteEl sitio indica el formato a ser.Set-Cookie: __Secure-ID=123; Secure; Domain=example.com; HttpOnly

También siguiendosintaxis MDN, según su ejemplo, esperaría que necesitara:

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

Es posible que también desees agregar ; HttpOnlytexto fuerte al final.

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

información relacionada