How to overwrite server_name value in istio 1.1 (envoy 1.11.0)?

487 views Asked by At

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

2

There are 2 answers

3
Peter Claes On

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
0
imriss On

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