SetBypassSetupToken wires the operator's PAD_BYPASS_SETUP_TOKEN choice into the Server. When true, handleBootstrap accepts a self-host first-admin POST from any IP without an X-Bootstrap-Token header. Cloud mode never honors this flag (see Server.bypassSetupToken doc). Called once at startup from c
(bypass bool)
| 189 | // half-set value; the field reads in handleBootstrap and |
| 190 | // handleSessionCheck are therefore unguarded. |
| 191 | func (s *Server) SetBypassSetupToken(bypass bool) { |
| 192 | s.bypassSetupToken = bypass |
| 193 | } |
| 194 | |
| 195 | // openBootstrapEnabled reports whether open-bootstrap is active for this |
| 196 | // server: bypass flag is set AND we're not in cloud mode. Cloud mode |
no outgoing calls