Skip to content

Commit

Permalink
drop gethead middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Dec 10, 2023
1 parent 0cb0b62 commit 8063cfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewSpamWeb(tbAPI TbAPI, params Config) (*SpamWeb, error) {
// Run starts server and accepts requests to unban users from telegram
func (s *SpamWeb) Run(ctx context.Context) error {
router := chi.NewRouter()
router.Use(rest.Recoverer(lgr.Default()), middleware.GetHead)
router.Use(rest.Recoverer(lgr.Default()))
router.Use(middleware.Throttle(1000), middleware.Timeout(60*time.Second))
router.Use(rest.AppInfo("tg-spam", "umputun", s.Version), rest.Ping)
router.Use(tollbooth_chi.LimitHandler(tollbooth.NewLimiter(5, nil)))
Expand Down

0 comments on commit 8063cfc

Please sign in to comment.