title: Spring Cloud Gateway inject header
body: <p>In the GatewayFilter, I am trying to inject a header into the request like below. </p>
  
  <p><code>@Override
      public Mono&lt;Void&gt; filter(ServerWebExchange exchange, GatewayFilterChain chain) {
          //DO SOME AUTHORIZATION OPERATIONS
          String jwt = "xxxxx"
          exchange.getRequest().getHeaders().add("headerkey", jwt);
          return chain.filter(exchange);
      }</code></p>
  
  <p>But I am getting the below error:</p>
  
  <pre><code>java.lang.UnsupportedOperationException: null
  at java.util.Collections$UnmodifiableMap.computeIfAbsent(Collections.java:1535) ~[na:1.8.0_111]
  at org.springframework.http.HttpHeaders.add(HttpHeaders.java:1425) ~[spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
  at com.trimble.sample.springcloudgateway.filter.AuthGatewayFilter.filter(AuthGatewayFilter.java:30) ~[classes/:na]
  at org.springframework.cloud.gateway.filter.OrderedGatewayFilter.filter(OrderedGatewayFilter.java:44) ~[spring-cloud-gateway-core-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  at org.springframework.cloud.gateway.handler.FilteringWebHandler$DefaultGatewayFilterChain.filter(FilteringWebHandler.java:103) ~[spring-cloud-gateway-core-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  at org.springframework.cloud.gateway.filter.NettyWriteResponseFilter.filter(NettyWriteResponseFilter.java:62) ~[spring-cloud-gateway-core-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  at org.springframework.cloud.gateway.handler.FilteringWebHandler$GatewayFilterAdapter.filter(FilteringWebHandler.java:121) ~[spring-cloud-gateway-core-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  at org.springframework.cloud.gateway.filter.OrderedGatewayFilter.filter(OrderedGatewayFilter.java:44) ~[spring-cloud-gateway-core-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  at org.springframework.cloud.gateway.handler.FilteringWebHandler$DefaultGatewayFilterChain.filter(FilteringWebHandler.java:103) ~[spring-cloud-gateway-core-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  </code></pre>