Commit 0d5831b6 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Document some code

parent d402da30
......@@ -21,6 +21,8 @@ type blocker struct {
status int
}
// Prevent internal API responses intended for gitlab-workhorse from
// leaking to the end user
func (b *blocker) Header() http.Header {
return b.rw.Header()
}
......
......@@ -15,6 +15,9 @@ type Secret struct {
sync.RWMutex
}
// Lazy access to the HMAC secret key. We must be lazy because if the key
// is not already there, it will be generated by gitlab-rails, and
// gitlab-rails is slow.
func (s *Secret) Bytes() ([]byte, error) {
if bytes := s.getBytes(); bytes != nil {
return bytes, nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment