File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
api/src/main/java/io/kafbat/ui/exception Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1212import java .util .function .Consumer ;
1313import java .util .stream .Collectors ;
1414import java .util .stream .Stream ;
15+ import org .springframework .beans .factory .annotation .Autowired ;
1516import org .springframework .boot .autoconfigure .web .WebProperties ;
1617import org .springframework .boot .autoconfigure .web .reactive .error .AbstractErrorWebExceptionHandler ;
1718import org .springframework .boot .web .reactive .error .ErrorAttributes ;
3839@ Order (Ordered .HIGHEST_PRECEDENCE )
3940public class GlobalErrorWebExceptionHandler extends AbstractErrorWebExceptionHandler {
4041
42+ @ Autowired
43+ private CorsGlobalConfiguration corsGlobalConfiguration ;
44+
4145 public GlobalErrorWebExceptionHandler (ErrorAttributes errorAttributes ,
4246 ApplicationContext applicationContext ,
4347 ServerCodecConfigurer codecConfigurer ) {
@@ -151,7 +155,7 @@ private String requestId(ServerRequest request) {
151155 }
152156
153157 private Consumer <HttpHeaders > headers (ServerRequest request ) {
154- return CorsGlobalConfiguration ::fillCorsHeader ;
158+ return corsGlobalConfiguration ::fillCorsHeader ;
155159 }
156160
157161 private BigDecimal currentTimestamp () {
You can’t perform that action at this time.
0 commit comments