From 045cb645bb4789f32c4878443bd0b395858b8eda Mon Sep 17 00:00:00 2001 From: Bertram Truong Date: Tue, 28 Jun 2016 01:46:47 +1000 Subject: [PATCH] Update README.md Added line to add for insecure HTTPS connections. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index ae4bf2be..7b0b0665 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,14 @@ wp.posts().then(function( data ) { ``` The `wp` object will have endpoint handler methods for every endpoint that ships with the default WordPress REST API plugin. +### Self-signed (Insecure) HTTPS Certificates + +In a case where you would want to connect to a HTTPS WordPress installation that has a self-signed certificate (insecure), you will need to force a connection by placing the following line before you make any `wp` calls. + +```javascript +process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; +``` + ### Auto-Discovery It is also possible to leverage the [capability discovery](http://v2.wp-api.org/guide/discovery/) features of the API to automatically detect and add setter methods for your custom routes, or routes added by plugins.