Skip to content

HSTS Missing From HTTPS Server Error From Prometheus server Metric Port #930

Description

@HARISANTHA-SWARNA

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions