Skip to content

Commit 8d66ec0

Browse files
committed
remove static context from CorsProperties injection
1 parent c011913 commit 8d66ec0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/src/main/java/io/kafbat/ui/config/CorsGlobalConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public class CorsGlobalConfiguration {
1818

1919
@Autowired
20-
private static CorsProperties corsProperties;
20+
private CorsProperties corsProperties;
2121

2222
@Bean
2323
public WebFilter corsFilter() {
@@ -37,7 +37,7 @@ public WebFilter corsFilter() {
3737
};
3838
}
3939

40-
public static void fillCorsHeader(HttpHeaders responseHeaders) {
40+
public void fillCorsHeader(HttpHeaders responseHeaders) {
4141
responseHeaders.add("Access-Control-Allow-Origin", corsProperties.getAllowedOrigins());
4242
responseHeaders.add("Access-Control-Allow-Credentials", corsProperties.getAllowCredentials());
4343
responseHeaders.add("Access-Control-Allow-Methods", corsProperties.getAllowedMethods());

0 commit comments

Comments
 (0)