Disable: Too many attempts try again in an hour


#1

This is perfectly acceptable in production; not so in dev mode. Is there a way to disable or increase the number of requests in dev mode? Endpoint is api/v0.1/authentication/token

I’m structuring best ways to store the expires_in to compare current date with expired date with date.setSeconds(expires_in)


#2

Hey @SylarRuby

You can create (or modify) a config.development.json in the root of your Ghost directory and add the following to it

{
  "spam": {
    "global_block": {
      "freeRetries": 100000000
    },
    "user_login": {
      "freeRetries": 100000000
    }
  }
}

The other keys you might want to use are "user_reset", "global_reset" "private_block"

Hope this helps!


#3

Thanks. How to use this json? A doc? Also, Im getting

ER_BAD_FIELD_ERROR: Unknown column 'NaN' in 'field list'

when going to the endpoint mentioned above. I cannot see any mentioning of the keys here.


#4

The docs for how to use config are on our docs site: https://docs.ghost.org/concepts/config :relaxed:

The docs link to our default config file here: https://github.com/TryGhost/Ghost/blob/master/core/server/config/defaults.json - unfortunately there isn’t an in depth write up for those keys yet, so you’ll have to dig around the code to get an idea of what they’re used for (start here: https://github.com/TryGhost/Ghost/blob/master/core/server/web/shared/middlewares/api/spam-prevention.js)

I’m not 100% sure about your error, if you’ve made local changes it might be that. If you can replicate this error on the master branch or the latest tag, I would recommend raising a bug https://github.com/TryGhost/Ghost/issues/new/choose and including the steps for someone to reproduce!


#5

I’ve just found this. Awesome! Thanks!


#6

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