File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
web/src/main/java/org/springframework/security/web/server/transport Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,10 @@ private URI createRedirectUri(ServerWebExchange exchange) {
102
102
UriComponentsBuilder .fromUri (exchange .getRequest ().getURI ());
103
103
104
104
if (port > 0 ) {
105
- builder .port (Optional .ofNullable (this .portMapper .lookupHttpsPort (port ))
106
- .orElseThrow (() -> new IllegalStateException (
107
- "HTTP Port '" + port + "' does not have a corresponding HTTPS Port" )));
105
+ Optional .ofNullable (this .portMapper .lookupHttpsPort (port ))
106
+ .map (builder ::port )
107
+ .orElseThrow (() -> new IllegalStateException (
108
+ "HTTP Port '" + port + "' does not have a corresponding HTTPS Port" ));
108
109
}
109
110
110
111
return builder .scheme ("https" ).build ().toUri ();
You can’t perform that action at this time.
0 commit comments