From 62ae65c76816b90b88c7010b4f9d3f6171741ac3 Mon Sep 17 00:00:00 2001 From: Scott Gress Date: Sat, 10 Mar 2018 02:03:28 -0600 Subject: [PATCH] [docs] Add note in docs for `origins(fn)` about `error` needing to be a string. (#2895) --- docs/API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index 0465c4556e..3b5e1b28d7 100644 --- a/docs/API.md +++ b/docs/API.md @@ -239,7 +239,7 @@ io.origins(['https://foo.example.com:443']); - `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 `*`