()
| 163 | } |
| 164 | |
| 165 | func (s *Server) effectiveInfercoreAPIKey() string { |
| 166 | if k := strings.TrimSpace(os.Getenv("INFERCORE_API_KEY")); k != "" { |
| 167 | return k |
| 168 | } |
| 169 | return strings.TrimSpace(s.cfg.Server.InfercoreAPIKey) |
| 170 | } |
| 171 | |
| 172 | func (s *Server) withOptionalInfercoreAuth(next http.Handler) http.Handler { |
| 173 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
no outgoing calls
no test coverage detected