-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Correct Next.js sensitive info examples (#98)
* fix: Correct Next.js sensitive info examples * Dont use a real ID
- Loading branch information
1 parent
69ccde1
commit d4d55dd
Showing
9 changed files
with
43 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,36 +100,31 @@ it in middleware to protect every route, but we'll start with a single route. | |
</TabItem> | ||
</Tabs> | ||
|
||
### 4. Start app | ||
### 4. Test sending personal info | ||
|
||
Start your app and load `http://localhost:3000`. Refresh the page and you will | ||
see the requests showing up in the [Arcjet dashboard](https://app.arcjet.com). | ||
|
||
### 5. Test sending personal info | ||
|
||
To see Arcjet Sensitive Information detection in action, try making a request | ||
with a blocked entity in the body of the request. For example if you have configured | ||
Arcjet to block requests containing email addresses then try and send an email address. | ||
To see Arcjet Sensitive Information detection in action, start your app and try | ||
making a request with an email address in the body of the request: | ||
|
||
```sh | ||
curl -v http://localhost:3000 --data "My email address is [email protected]" | ||
curl -v http://localhost:3000/api/arcjet --data "My email address is [email protected]" | ||
``` | ||
|
||
You should see this in your logs | ||
|
||
```text | ||
Rule Result ArcjetRuleResult { | ||
ruleId: '', | ||
Arcjet decision ArcjetDenyDecision { | ||
id: '', // This will contain the Arcjet request ID | ||
ttl: 0, | ||
state: 'RUN', | ||
conclusion: 'DENY', | ||
reason: ArcjetSensitiveInfoReason { | ||
type: 'SENSITIVE_INFO', | ||
denied: [ { start: 5, end: 21, identifiedType: 'EMAIL' } ], | ||
allowed: [] | ||
} | ||
}, | ||
Conclusion ALLOW | ||
results: [ | ||
ArcjetRuleResult { | ||
ruleId: '', | ||
ttl: 0, | ||
state: 'RUN', | ||
conclusion: 'DENY', | ||
reason: [ArcjetSensitiveInfoReason] | ||
} | ||
], | ||
... | ||
``` | ||
|
||
The final conclusion is `ALLOW` even though the rule result conclusion is | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters