Skip to content

Commit e0023fb

Browse files
authored
Merge pull request #9 from securenative/dev
Remove pii data from headers
2 parents 75aa74e + 42d4ee9 commit e0023fb

File tree

10 files changed

+742
-464
lines changed

10 files changed

+742
-464
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ jobs:
3333
- name: Publish to codecov
3434
run: bash <(curl -s https://codecov.io/bash)
3535

36-
- name: Create changelog
37-
uses: heinrichreimer/[email protected]
38-
with:
39-
token: ${{ secrets.GITHUB_TOKEN }}
40-
4136
- name: Notify slack success
4237
if: success()
4338
env:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ node_modules/
2222
dist/
2323
coverage/
2424

25-
.idea
25+
.idea
26+
.phpunit.result

.phpunit.result.cache

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,5 +211,30 @@ Initialize sdk as shown above.
211211
$options = new SecureNativeOptions();
212212
$options->setProxyHeaders(["CF-Connecting-IP"]);
213213

214+
SecureNative::init();
215+
```
216+
217+
218+
## Remove PII Data From Headers
219+
220+
By default, SecureNative SDK remove any known pii headers from the received request.
221+
We also support using custom pii headers and regex matching via configuration, for example:
222+
223+
### Option 1: Using config file
224+
```json
225+
{
226+
"SECURENATIVE_API_KEY": "YOUR_API_KEY",
227+
"SECURENATIVE_PII_HEADERS": ["apiKey"]
228+
}
229+
```
230+
231+
Initialize sdk as shown above.
232+
233+
### Options 2: Using ConfigurationBuilder
234+
235+
```php
236+
$options = new SecureNativeOptions();
237+
$options->setPiiRegexPattern("/http_auth_/i");
238+
214239
SecureNative::init();
215240
```

0 commit comments

Comments
 (0)