Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit deb5f32

Browse files
committed
chore(sonar): fix code smells
1 parent 2a80426 commit deb5f32

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

graphql-spring-boot-autoconfigure/src/main/java/graphql/kickstart/autoconfigure/web/servlet/GraphQLWebAutoConfiguration.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@
8585
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
8686
import org.springframework.web.filter.CorsFilter;
8787
import org.springframework.web.servlet.DispatcherServlet;
88+
import org.springframework.web.util.UrlPathHelper;
8889

8990
/** @author <a href="mailto:java.lang.RuntimeException@gmail.com">oEmbedler Inc.</a> */
91+
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
9092
@Slf4j
9193
@Configuration
9294
@RequiredArgsConstructor
@@ -139,7 +141,9 @@ public CorsFilter corsConfigurer(CorsConfiguration corsConfiguration) {
139141

140142
UrlBasedCorsConfigurationSource configurationSource = new UrlBasedCorsConfigurationSource();
141143
configurationSource.setCorsConfigurations(corsConfigurations);
142-
configurationSource.setAlwaysUseFullPath(true);
144+
UrlPathHelper urlPathHelper = new UrlPathHelper();
145+
urlPathHelper.setAlwaysUseFullPath(true);
146+
configurationSource.setUrlPathHelper(urlPathHelper);
143147

144148
return new CorsFilter(configurationSource);
145149
}

0 commit comments

Comments
 (0)