Skip to content

Commit

Permalink
Calendar app not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
songy23 committed Oct 15, 2024
1 parent 2964cd5 commit be756f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions comp/otelcol/ddflareextension/impl/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ type server struct {
// validateToken - validates token for legacy API
func validateToken(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if util.GetAuthToken() != "" {
if err := util.Validate(w, r); err != nil {
return
}
if err := util.Validate(w, r); err != nil {
return
}
next.ServeHTTP(w, r)
})
Expand Down Expand Up @@ -114,7 +112,9 @@ func newServer(endpoint string, handler http.Handler) (*server, error) {
r := mux.NewRouter()
r.Handle("/", handler)

r.Use(validateToken)
if util.GetAuthToken() != "" {
r.Use(validateToken)
}

s := &http.Server{
Addr: endpoint,
Expand Down
1 change: 0 additions & 1 deletion test/new-e2e/tests/otel/otel-agent/no_dd_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ var noDDExporterConfig string

func (s *noDDExporterTestSuite) SetupSuite() {
s.BaseSuite.SetupSuite()
utils.TestCalendarApp(s)
}

func TestOTelAgentWithNoDDExporter(t *testing.T) {
Expand Down

0 comments on commit be756f0

Please sign in to comment.