File: useragent.go

package info (click to toggle)
golang-github-smallstep-crypto 0.57.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,284 kB
  • sloc: sh: 53; makefile: 36
file content (12 lines) | stat: -rw-r--r-- 347 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
package attestation

import "net/http"

// UserAgent is the value of the User-Agent HTTP header that will
// be set in HTTP requests to the attestation CA.
var UserAgent = "step-attestation-http-client/1.0"

// setUserAgent sets the User-Agent header in HTTP requests.
func setUserAgent(r *http.Request) {
	r.Header.Set("User-Agent", UserAgent)
}