Skip to content

Commit

Permalink
Merge pull request #23 from blockchain-certificates/docs/document-san…
Browse files Browse the repository at this point in the history
…itizer

docs(Sanitizer): document dev mode
  • Loading branch information
Julien Fraichot authored Jan 7, 2019
2 parents dd9c930 + ea5a896 commit e8244ae
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,26 @@ Supported Events:
npm run start
```
Will make the demo page available on http://localhost:8081/demo/.
Will make the demo page available on http://localhost:8081/demo/.
## Modifying the Sanitizer
The `sanitizer` is used in order to protect against malicious certificates that could hold XSS attacks.
It is an overlay of the [xss](https://www.npmjs.com/package/xss) library, since at times, you might want to be able to configure or adapt the whitelist to your own needs.
To modify it, you should modify the index.js file. Then run:
```
npm run build:sanitizer
```
This will generate the `sanitizer.js` file, which is then used by the application and the tests.
If you want to work on the sanitizer in watch mode (and auto-generate your changes), use the following command:
```
npm run build:sanitizer -- -w
```
## Running Tests
Expand Down

0 comments on commit e8244ae

Please sign in to comment.