Skip to content

Commit

Permalink
Make this an internal endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mjh1 committed Feb 21, 2024
1 parent a9c42a7 commit 586772f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 0 additions & 6 deletions api/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ func NewCatalystAPIRouter(cli config.Cli, vodEngine *pipeline.Coordinator, bal b
for _, path := range [...]string{"/asset/hls/:playbackID/*file", "/webrtc/:playbackID"} {
router.OPTIONS(path, playback)
}
image := middleware.LogAndMetrics(metrics.Metrics.ImageAPIDurationSec)(
withCORS(
handlers.NewImageHandler(cli.PublicBucketURLs).Handle,
),
)
router.GET("/asset/image/:playbackID/thumbnail.jpg", image)

// Handling incoming playback redirection requests
redirectHandler := withLogging(withCORS(geoHandlers.RedirectHandler()))
Expand Down
9 changes: 9 additions & 0 deletions api/http_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/livepeer/catalyst-api/handlers/misttriggers"
"github.com/livepeer/catalyst-api/log"
mistapiconnector "github.com/livepeer/catalyst-api/mapic"
"github.com/livepeer/catalyst-api/metrics"
"github.com/livepeer/catalyst-api/middleware"
"github.com/livepeer/catalyst-api/pipeline"
"github.com/livepeer/go-api-client"
Expand Down Expand Up @@ -113,6 +114,14 @@ func NewCatalystAPIRouterInternal(cli config.Cli, vodEngine *pipeline.Coordinato
),
),
)
router.GET("/api/image/:playbackID/thumbnail.jpg",
middleware.LogAndMetrics(metrics.Metrics.ImageAPIDurationSec)(
withAuth(
cli.APIToken,
handlers.NewImageHandler(cli.PrivateBucketURLs).Handle,
),
),
)

// Public handler to propagate an event to all Catalyst nodes
router.POST("/api/events", withLogging(eventsHandler.Events()))
Expand Down

0 comments on commit 586772f

Please sign in to comment.