anchor.diff:  		// ...
   		.redirectToHttps(withDefaults());
   	return http.build();
  +}
  +----
  +
  +.Kotlin
  +[source,kotlin,role="secondary"]
  +----
  +@Bean
  +fun springSecurityFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
  +    return http {
  +        // ...
  +        redirectToHttps { }
  +    }
   }
   ----
   ====
  
positive.code: 
  .Redirect to HTTPS when X-Forwarded
  ====
  [source,java]
  ----
  @Bean
  SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
  
negative.code: 			.httpsRedirectWhen(e -> e.getRequest().getHeaders().containsKey("X-Forwarded-Proto"))
  		);
  	return http.build();
  }
  ----
  
  .Kotlin
  [source,kotlin,role="secondary"]
  ----
  @Bean
  fun springSecurityFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
      return http {
          // ...
          redirectToHttps {
              httpsRedirectWhen {
                  it.request.headers.containsKey("X-Forwarded-Proto")
              }
          }
      }
  }
  ----
  ====
  