8const defaultStaticResponseCode = 200
10// newStaticResponseHandler creates a new staticResponseHandler that serves a
11// a static response code.
12func newStaticResponseHandler(upstream string, code *int) http.Handler {
14 c := defaultStaticResponseCode
17 return &staticResponseHandler{
23// staticResponseHandler responds with a static response with the given response code.
24type staticResponseHandler struct {
29// ServeHTTP serves a static response.
30func (s *staticResponseHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
31 rw.Header().Set("GAP-Upstream-Address", s.upstream)
32 rw.WriteHeader(s.code)
33 fmt.Fprintf(rw, "Authenticated")
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list