mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-15 13:02:07 +08:00
v1.2.1 GA
SAML 2.0 optimization,support 阿里云、腾讯云 SSO maxkey-mgt main report APPS ExtraAttr fix ui bugs remove maxkey-jose-jwt dep com.nimbusds nimbus-jose-jwt dep net.jcip jcip-annotations dep net.minidev json-smart dep net.minidev asm
This commit is contained in:
@@ -62,30 +62,31 @@ public class MaxKeyConfig {
|
||||
};
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Connector connector(){
|
||||
Connector connector=new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
||||
connector.setScheme("http");
|
||||
connector.setPort(80);
|
||||
connector.setSecure(false);
|
||||
connector.setRedirectPort(443);
|
||||
return connector;
|
||||
}
|
||||
@Bean
|
||||
public Connector connector() {
|
||||
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
||||
connector.setScheme("http");
|
||||
connector.setPort(80);
|
||||
connector.setSecure(false);
|
||||
connector.setRedirectPort(443);
|
||||
return connector;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public TomcatServletWebServerFactory tomcatServletWebServerFactory(Connector connector) {
|
||||
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() {
|
||||
@Override
|
||||
protected void postProcessContext(Context context) {
|
||||
SecurityConstraint securityConstraint = new SecurityConstraint();
|
||||
securityConstraint.setUserConstraint("CONFIDENTIAL");
|
||||
SecurityCollection collection = new SecurityCollection();
|
||||
collection.addPattern("/*");
|
||||
securityConstraint.addCollection(collection);
|
||||
context.addConstraint(securityConstraint);
|
||||
}
|
||||
};
|
||||
tomcat.addAdditionalTomcatConnectors(connector);
|
||||
return tomcat;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public TomcatServletWebServerFactory tomcatServletWebServerFactory(Connector connector){
|
||||
TomcatServletWebServerFactory tomcat=new TomcatServletWebServerFactory(){
|
||||
@Override
|
||||
protected void postProcessContext(Context context) {
|
||||
SecurityConstraint securityConstraint=new SecurityConstraint();
|
||||
securityConstraint.setUserConstraint("CONFIDENTIAL");
|
||||
SecurityCollection collection=new SecurityCollection();
|
||||
collection.addPattern("/*");
|
||||
securityConstraint.addCollection(collection);
|
||||
context.addConstraint(securityConstraint);
|
||||
}
|
||||
};
|
||||
tomcat.addAdditionalTomcatConnectors(connector);
|
||||
return tomcat;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user