@@ -51,6 +51,9 @@ public class Proxy {
5151@ Value ("${api-auth-proxy.host}" )
5252private String selfHost ;
5353
54+ @ Value ("${api-auth-proxy.forward-signing.enabled}" )
55+ private boolean forwardSigningEnabled ;
56+
5457@ Value ("${api-auth-proxy.resource-protection.enabled}" )
5558private boolean resourceProtectionEnabled ;
5659
@@ -99,8 +102,10 @@ private ResponseEntity<String> handleForwardProxyMode(RequestEntity request, Htt
99102HttpHeaders newHeaders =new HttpHeaders ();
100103newHeaders .add ("X-Forwarded-For" ,servletRequest .getRemoteAddr ());
101104
102- final String accessToken =getAccessToken ().getValue ();
103- newHeaders .add (HttpHeaders .AUTHORIZATION ,String .format ("Bearer %s" ,accessToken ));
105+ if (forwardSigningEnabled ) {
106+ final String accessToken =getAccessToken ().getValue ();
107+ newHeaders .add (HttpHeaders .AUTHORIZATION ,String .format ("Bearer %s" ,accessToken ));
108+ }
104109
105110final RequestEntity forwardRequest =requestEntity (request ,newHeaders ,request .getUrl ());
106111return restTemplate .exchange (forwardRequest ,String .class );