File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11INCLUDE ( 'Cookie' ) ;
22
3+ var securityService = CC [ '@mozilla.org/ssservice;1' ]
4+ . getService ( CI . nsISiteSecurityService ) ;
5+
36// Hack. We only need the part of the policystate that tracks content
47// policy loading.
58const PolicyState = {
@@ -37,9 +40,11 @@ const HTTPS = {
3740 */
3841 replaceChannel : function ( applicable_list , channel , httpNowhereEnabled ) {
3942 var blob = HTTPSRules . rewrittenURI ( applicable_list , channel . URI . clone ( ) ) ;
43+ var isSTS = securityService . isSecureURI (
44+ CI . nsISiteSecurityService . HEADER_HSTS , channel . URI , 0 ) ;
4045 if ( blob === null ) {
4146 // Abort insecure requests if HTTP Nowhere is on
42- if ( httpNowhereEnabled && channel . URI . schemeIs ( "http" ) ) {
47+ if ( httpNowhereEnabled && channel . URI . schemeIs ( "http" ) && ! isSTS ) {
4348 IOUtil . abort ( channel ) ;
4449 }
4550 return false ; // no rewrite
You can’t perform that action at this time.
0 commit comments