Disable: Too many attempts try again in an hour

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)

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!

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.

The docs for how to use config are on our docs site: Configuration - Adapt your publication to suit your needs :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 Sign in to GitHub · GitHub and including the steps for someone to reproduce!

2 Likes

I’ve just found this. Awesome! Thanks!

1 Like

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