Hi Team, I've noticed that our BentoML server is r...
# ask-for-help
a
Hi Team, I've noticed that our BentoML server is revealing the
server: uvicorn
header in its response headers. We need to ensure that this header is not exposed to external clients for security reasons. Could you please assist me in finding a solution to remove this header from the response? The response headers I get:
Copy code
HTTP/1.1 200 OK
Date: Wed, 03 Apr 2024 04:22:29 GMT
Content-Type: application/json
Content-Length: 43
Connection: keep-alive
server: uvicorn
o
How are you serving? For instance, if you are serving your Bento as a container on a Kubernetes cluster and using some service mesh solution like istio or linkerd, you can configure your application ingress to remove headers without updating your service source.
a
I am using AWS ECS to serve bento as a container.
The requests are handled using Internal AWS ALB.
o
I would look into app-mesh to achieve header modification https://docs.aws.amazon.com/app-mesh/latest/userguide/getting-started-ecs.html
I would imagine that you can configure your virtual services to manipulate headers returned from your application, but I have never used this
a
Is there any way to remove the server header from the BentoML application configuration?