Commit afb127e0 authored by Khalid Ali's avatar Khalid Ali
Browse files

Fix broken Rest Template.

parent 7a4da761
......@@ -19,6 +19,7 @@ import;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.filter.ForwardedHeaderFilter;
import javax.servlet.http.HttpSessionEvent;
......@@ -36,8 +37,13 @@ public class BookshareApplication {
FilterRegistrationBean forwardedHeaderFilter() {
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
public RestTemplate restTemplate() {
return new RestTemplate();
FilterRegistrationBean<ForwardedHeaderFilter> forwardedHeaderFilter() {
FilterRegistrationBean<ForwardedHeaderFilter> filterRegistrationBean = new FilterRegistrationBean<>();
filterRegistrationBean.setFilter(new ForwardedHeaderFilter());
return filterRegistrationBean;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment