hasBootstrapToken reports whether a bootstrap token is currently configured. Lock-aware — safe to call without holding s.bootstrapMu. Used by handleSessionCheck to decide whether to advertise setup_method=logs_token.
()
| 154 | // Used by handleSessionCheck to decide whether to advertise |
| 155 | // setup_method=logs_token. |
| 156 | func (s *Server) hasBootstrapToken() bool { |
| 157 | s.bootstrapMu.Lock() |
| 158 | defer s.bootstrapMu.Unlock() |
| 159 | return s.bootstrapToken != "" |
| 160 | } |
| 161 | |
| 162 | // checkBootstrapToken validates the X-Bootstrap-Token header on r against |
| 163 | // the in-memory token using a constant-time comparison. Returns false if |
no outgoing calls