File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
src/Symfony/Component/HttpFoundation Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Di
ABFC
ff line number Diff line change @@ -771,13 +771,11 @@ public function getQueryString()
771
771
*/
772
772
public function isSecure ()
773
773
{
774
- return (
775
- (strtolower ($ this ->server ->get ('HTTPS ' )) == 'on ' || $ this ->server ->get ('HTTPS ' ) == 1 )
776
- ||
777
- (self ::$ trustProxyData && strtolower ($ this ->headers ->get ('SSL_HTTPS ' )) == 'on ' || $ this ->headers ->get ('SSL_HTTPS ' ) == 1 )
778
- ||
779
- (self ::$ trustProxyData && self ::$ trustedHeaders ['client_proto ' ] && strtolower ($ this ->headers ->get (self ::$ trustedHeaders ['client_proto ' ])) == 'https ' )
780
- );
774
+ if (self ::$ trustProxyData && self ::$ trustedHeaders ['client_proto ' ] && $ proto = $ this ->headers ->get (self ::$ trustedHeaders ['client_proto ' ])) {
775
+ return in_array (strtolower ($ proto ), array ('https ' , 'on ' , '1 ' ));
776
+ }
777
+
778
+ return 'on ' == strtolower ($ this ->server ->get ('HTTPS ' )) || 1 == $ this ->server ->get ('HTTPS ' );
781
779
}
782
780
783
781
/**
You can’t perform that action at this time.
0 commit comments