We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a89c220 commit dc17352Copy full SHA for dc17352
cmd/jetstream/main.go
@@ -20,6 +20,7 @@ import (
20
"github.com/bluesky-social/jetstream/pkg/server"
21
"github.com/gorilla/websocket"
22
"github.com/labstack/echo/v4"
23
+ "github.com/labstack/echo/v4/middleware"
24
"github.com/prometheus/client_golang/prometheus/promhttp"
25
26
"github.com/urfave/cli/v2"
@@ -212,6 +213,10 @@ func Jetstream(cctx *cli.Context) error {
212
213
}
214
215
e := echo.New()
216
+ e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
217
+ AllowOrigins: []string{"*"},
218
+ AllowMethods: []string{http.MethodGet, http.MethodHead, http.MethodOptions},
219
+ }))
220
e.GET("/", func(c echo.Context) error {
221
return c.String(http.StatusOK, "Welcome to Jetstream")
222
})
0 commit comments