Hey,
We are using prometheus server API and starting metrics server to provide metrics data to prometheus and below lines are from the code that we are working.
http.Handle("/metrics", promhttp.Handler())
server := &http.Server{
Addr: metricsAddr,
}
server.ListenAndServe()
we are using nessus tool to scan the metrics port and it is throwing vulnerability HSTS missing header.
How we can add HSTS header to the server?
Can you help us in resolving the issue ? Any ideas on it ?
Thanks in advance.
Hey,
We are using prometheus server API and starting metrics server to provide metrics data to prometheus and below lines are from the code that we are working.
http.Handle("/metrics", promhttp.Handler())
server := &http.Server{
Addr: metricsAddr,
}
server.ListenAndServe()
we are using nessus tool to scan the metrics port and it is throwing vulnerability HSTS missing header.
How we can add HSTS header to the server?
Can you help us in resolving the issue ? Any ideas on it ?
Thanks in advance.