0

The default value for server in the response headers is istio-envoy. How can it be overwritten to an arbitrary value?

istio: 1.1

envoy: 1.11.0

Thanks

imriss
  • 1,815
  • 4
  • 31
  • 46

2 Answers2

0

I think you can change it with an Istio EnvoyFilter (server_name attribute) :

https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/filter/network/http_connection_manager/v2/http_connection_manager.proto

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: set-server
  namespace: istio-system
spec:
  configPatches:
  - applyTo: NETWORK_FILTER
    match:
      listener:
        filterChain:
          filter:
            name: "envoy.http_connection_manager"
    patch:
      operation: MERGE
      value:
        config:
          server_name: peke_was_here
Peter Claes
  • 285
  • 3
  • 9
  • Thanks. However, this is not available in istio 1.1 (envoy 1.11.0): https://www.envoyproxy.io/docs/envoy/v1.11.0/ – imriss Sep 23 '20 at 00:29
  • Any suggestion whether lua filter can be used for this purposes? https://www.envoyproxy.io/docs/envoy/v1.11.0/configuration/http_filters/lua_filter.html – imriss Sep 23 '20 at 00:30
  • 1
    the **server** header is a special header and I think it can't be modified at the **httpfilter** level (where you can use lua) – Peter Claes Sep 24 '20 at 05:51
0

I was able to resolve this by building custom pilot and proxy images from the source after changing the server name constant value.

imriss
  • 1,815
  • 4
  • 31
  • 46