Skip to content

Commit

Permalink
fixing package name in readme and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgobich committed May 26, 2022
1 parent 2f57faa commit e0bbdc6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ have been left untouched. If any fields have been filled, we know a bot has subm
## Installation
First install the package as a dependency on your project
```bash
npm i @adocasts.com/adonisjs-bouncer
npm i @adocasts.com/adonisjs-honeypot
```
Then configure it within your project
```bash
node ace configure @adocasts.com/adonisjs-bouncer
node ace configure @adocasts.com/adonisjs-honeypot
```

Lastly, add it as a middleware within your project.
Expand All @@ -27,6 +27,14 @@ Server.middleware.registerNamed({
})
```

Also, be sure to define custom honeypot fields within `config/honeypot.ts`.
The more realistic the field names the more likely the honeypot is to work.
However, be sure the field names won't conflict with any fields in your site.
```js
// here are the default fields
fields: ['ohbother', 'ohpiglet', 'ohpoo', 'firstName', 'lastName'],
```

## Usage
To add honeypot to a form submission,
first apply the middleware to your route(s).
Expand All @@ -52,14 +60,6 @@ So, all you need to do is add this component within your form!
</form>
```

Also, be sure to define custom honeypot fields within `config/honeypot.ts`.
The more realistic the field names the more likely the honeypot is to work.
However, be sure the field names won't conflict with any fields in your site.
```js
// here are the default fields
fields: ['ohbother', 'ohpiglet', 'ohpoo', 'firstName', 'lastName'],
```

[npm-image]: https://img.shields.io/npm/v/@adocasts.com/adonisjs-honeypot.svg?style=for-the-badge&logo=npm
[npm-url]: https://npmjs.org/package/@adocasts.com/adonisjs-honeypot "npm"

Expand Down
2 changes: 0 additions & 2 deletions instructions.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
The Adocasts package `@adocasts/adonisjs-honeypot` has been successfully configured. Before you begin, please register the below named middleware inside your `start/kernel.ts` file.
```ts
// start/kernel.ts

Server.middleware.registerNamed({
honeypot: () => import('@ioc:Adocasts/Honeypot') // 👈
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adocasts.com/adonisjs-honeypot",
"version": "1.0.5",
"version": "1.0.6",
"description": "Bot protection with Honeypot form fields in AdonisJS",
"main": "build/providers/HoneypotProvider.js",
"types": "build/adonis-typings/index.d.ts",
Expand Down

0 comments on commit e0bbdc6

Please sign in to comment.