diff --git a/src/main/java/com/catcher/config/WebConfig.java b/src/main/java/com/catcher/config/WebConfig.java index 1e58b626..df652440 100644 --- a/src/main/java/com/catcher/config/WebConfig.java +++ b/src/main/java/com/catcher/config/WebConfig.java @@ -1,7 +1,9 @@ package com.catcher.config; import lombok.RequiredArgsConstructor; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.web.filter.ForwardedHeaderFilter; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @@ -16,4 +18,9 @@ public class WebConfig implements WebMvcConfigurer { public void addArgumentResolvers(List resolvers) { resolvers.addAll(resolverList); } + + @Bean + ForwardedHeaderFilter forwardedHeaderFilter() { + return new ForwardedHeaderFilter(); + } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index a1468f64..ce9664f9 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -8,4 +8,5 @@ spring.datasource.driver-class-name=org.mariadb.jdbc.Driver ### swagger springdoc.api-docs.path=/core/v3/api-docs -springdoc.swagger-ui.config-url=/core/v3/api-docs/swagger-config \ No newline at end of file +springdoc.swagger-ui.config-url=/core/v3/api-docs/swagger-config +server.forward-headers-strategy=framework \ No newline at end of file