Ratelimit and period

Hi there,

i wanted to try the rate limiting feature of traefik (2.4.2) but if i define a period like shown in the docs i get errors from the traefik log.

[http.middlewares]
  [http.middlewares.test-ratelimit.rateLimit]
    average = 3
    burst = 1
    period = 1m

Error occurred during watcher callback: Near line 22 (last key parsed 'http.middlewares.test-ratelimit.rateLimit'): expected a top-level item to end with a newline, comment, or EOF, but got 'm' instead providerName=file

I don't understand whats wrong here...

Hi @lachnerd

Is it just missing a newline at the end of your period = 1m line ?

nope, checked it again.

error occurs also with newline.

:frowning:

I might try this myself in a little while.

@lachnerd

Try quoting it "1m". It is not valid toml as it is. Tried it with python toml.decoder and an online parser.

"1m" worked for me.

1 Like

with "1m" on the period traefik accepts the configuration (although the period is not shown in the UI), thx

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.