You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by lp...@apache.org on 2023/01/27 05:07:20 UTC

[shiro] branch main updated: feat(Jakarta EE): added alwaysEnabled config variable to SSL filter so as to ignore JSF if true

This is an automated email from the ASF dual-hosted git repository.

lprimak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shiro.git


The following commit(s) were added to refs/heads/main by this push:
     new 6a6d6f1f feat(Jakarta EE): added alwaysEnabled config variable to SSL filter so as to ignore JSF if true
6a6d6f1f is described below

commit 6a6d6f1faaef6ab39020fc6d0503864cd2c95695
Author: lprimak <le...@flowlogix.com>
AuthorDate: Thu Jan 26 21:06:18 2023 -0800

    feat(Jakarta EE): added alwaysEnabled config variable to SSL filter so as to ignore JSF if true
---
 .../src/main/java/org/apache/shiro/ee/filters/SslFilter.java          | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/SslFilter.java b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/SslFilter.java
index 171b09cd..21e2728f 100644
--- a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/SslFilter.java
+++ b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/SslFilter.java
@@ -29,11 +29,13 @@ import org.omnifaces.util.Faces;
 public class SslFilter extends org.apache.shiro.web.filter.authz.SslFilter {
     @Getter @Setter
     private boolean enablePortFilter = true;
+    @Getter @Setter
+    private boolean alwaysEnabled = false;
     private final boolean enabled = computeEnabled();
 
     @Override
     protected boolean isEnabled(ServletRequest request, ServletResponse response) throws ServletException, IOException {
-        return enabled && super.isEnabled(request, response);
+        return alwaysEnabled || enabled && super.isEnabled(request, response);
     }
 
     @Override