Skip to content

Commit

Permalink
perf($Gateway): dynamic web security switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnny Miller (锺俊) committed Dec 23, 2020
1 parent e3176ad commit b5f4333
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public class WebFluxSecurityConfiguration {

@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) {
if (mafConfiguration.getWebSecurityDisabled()) {
log.warn("Web security was disabled.");
return http
.cors().disable()
.csrf().disable()
.build();
}
return http
.cors().disable()
.csrf().disable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ spring:
max-idle: 10
max-wait: -1ms
min-idle: 0

maf:
configuration:
web-security-disabled: true

0 comments on commit b5f4333

Please sign in to comment.