Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add note in docs for origins(fn) about error needing to be a string.
  • Loading branch information
sgress454 committed Mar 10, 2017
commit 59edf2ff2ba5b99771463e434651e43d59435b6e
2 changes: 1 addition & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Sets the allowed origins `value`. Defaults to any origins being allowed. If no a
- `fn` _(Function)_
- **Returns** `Server`

Provides a function taking two arguments `origin:String` and `callback(error, success)`, where `success` is a boolean value indicating whether origin is allowed or not.
Provides a function taking two arguments `origin:String` and `callback(error, success)`, where `success` is a boolean value indicating whether origin is allowed or not. If `success` is set to `false`, `error` must be provided as a string value that will be appended to the server response, e.g. "Origin not allowed".

__Potential drawbacks__:
* in some situations, when it is not possible to determine `origin` it may have value of `*`
Expand Down