diff --git a/DuDoong-Api/src/main/java/band/gosrock/DuDoongApiServerApplication.java b/DuDoong-Api/src/main/java/band/gosrock/DuDoongApiServerApplication.java index 8e0ef59a..f84af290 100644 --- a/DuDoong-Api/src/main/java/band/gosrock/DuDoongApiServerApplication.java +++ b/DuDoong-Api/src/main/java/band/gosrock/DuDoongApiServerApplication.java @@ -8,7 +8,9 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; +import org.springframework.context.annotation.Bean; import org.springframework.core.env.Environment; +import org.springframework.web.filter.ForwardedHeaderFilter; @RequiredArgsConstructor @SpringBootApplication @@ -21,6 +23,11 @@ public static void main(String[] args) { SpringApplication.run(DuDoongApiServerApplication.class, args); } + @Bean + ForwardedHeaderFilter forwardedHeaderFilter() { + return new ForwardedHeaderFilter(); + } + @Override public void onApplicationEvent(ApplicationReadyEvent event) { log.info("applicationReady status" + Arrays.toString(environment.getActiveProfiles())); diff --git a/DuDoong-Api/src/main/resources/application.yml b/DuDoong-Api/src/main/resources/application.yml index 63657014..d1cbcc67 100644 --- a/DuDoong-Api/src/main/resources/application.yml +++ b/DuDoong-Api/src/main/resources/application.yml @@ -11,7 +11,8 @@ spring: springdoc: default-produces-media-type: application/json default-consumes-media-type: application/json - +server: + forward-headers-strategy: framework --- spring: config: