Skip to content

Commit

Permalink
[frock-9] Improve documentation around whitelisting and default white…
Browse files Browse the repository at this point in the history
…list
  • Loading branch information
fardog committed Jan 29, 2016
1 parent 371dc7d commit 6741b4c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ This examples expects that your `PATH` is set to run Node.js packages from your
project's installed `node_modules`; see the [Understanding Packages][packages]
section of the documentation for details.

_Note:_ By default, frock only allows connections from `localhost`; see the
[docs on connection filtering][filtering] for details.

## Detailed Documentation

frock's [documentation](./docs) is split into several sections:
Expand Down Expand Up @@ -142,6 +145,7 @@ Apache 2.0, see [LICENSE](./LICENSE) for details.
[plugins]: ./docs/plugins.md
[middleware]: ./docs/middleware.md
[frockfile]: ./docs/frockfile.md
[filtering]: ./docs/frockfile.md#connection-object-optional
[examples]: ./examples
[static]: http://www.npmjs.com/packages/frock-static
[proxy]: http://www.npmjs.com/packages/frock-proxy
4 changes: 3 additions & 1 deletion src/core-httpserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ function defaultRoute (req, res) {
}

function onWhitelistFail (req, res) {
const msg = 'access from non-whitelisted, or from blacklisted address'
const msg = 'access from non-whitelisted, or from blacklisted address. ' +
'see https://github.com/urbanairship/frock/blob/master/docs/frockfile.md#connection-object-optional ' +
'for further details.'

res.statusCode = 403
res.end(msg)
Expand Down
6 changes: 5 additions & 1 deletion src/core-socketserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,9 @@ createSocketServer._onSocketWhitelistFail = onSocketWhitelistFail

function onSocketWhitelistFail (client) {
client.end()
log.info('access socket from non-whitelisted, or from blacklisted address')
log.info(
'access socket from non-whitelisted, or from blacklisted address. ' +
'see https://github.com/urbanairship/frock/blob/master/docs/frockfile.md#connection-object-optional ' +
'for further details.'
)
}

0 comments on commit 6741b4c

Please sign in to comment.