Also cache some security headers

This commit is contained in:
斟酌 鵬兄 2022-04-05 23:15:01 +09:00
parent 4207a5b90e
commit 7dedaf8d77

View File

@ -62,6 +62,12 @@ class PageCache
if( res.headers[ "Content-Encoding" ] )
c.headers[ "Content-Encoding" ] = res.headers[ "Content-Encoding" ];
if( res.headers[ "Content-Security-Policy" ] )
c.headers[ "Content-Security-Policy" ] = res.headers[ "Content-Security-Policy" ];
if( res.headers[ "X-Frame-Options" ] )
c.headers[ "X-Frame-Options" ] = res.headers[ "X-Frame-Options" ];
this.cache[ this.__encRes( res ) ][ key ] = c;
Dragonfly.Debug( "StoreCache: \"" + key + "\", expire " + new Date( expires ) );
}