Automatically deploy pull requests for testing #8
|
@ -2,7 +2,9 @@ package se.su.dsv.whisperapi;
|
|||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.security.config.Customizer;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
|
@ -24,7 +26,9 @@ public class WhisperApiApplication {
|
|||
}
|
||||
|
||||
@Bean
|
||||
public ForwardedHeaderFilter forwardedHeaderFilter() {
|
||||
return new ForwardedHeaderFilter();
|
||||
public FilterRegistrationBean<ForwardedHeaderFilter> forwardedHeaderFilter() {
|
||||
var filterRegistrationBean = new FilterRegistrationBean<>(new ForwardedHeaderFilter());
|
||||
filterRegistrationBean.setOrder(Ordered.HIGHEST_PRECEDENCE);
|
||||
return filterRegistrationBean;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user