Closed joshbetz closed 7 years ago
In addition to the wpcom_vip_go_rest_api_request_allowed()
call, we'll need some protection for the REST endpoints being blocked via the rest_authentication_errors
filter. Cron Control handles it here: https://github.com/Automattic/vip-go-mu-plugins/blob/6d9c22a536fc62537dea797f621cd17888ffae10/001-cron.php#L45. We do the same for the sites endpoint here: https://github.com/Automattic/vip-go-mu-plugins/blob/d34e2e93e11135dbccbac573add05e354b988276/rest-api/vip-endpoints.php#L63.
we'll need some protection for the REST endpoints being blocked via the rest_authentication_errors filter.
Can we do this in a somewhat generic way so we don't have to repeat the same code everywhere?
Can we do this in a somewhat generic way so we don't have to repeat the same code everywhere?
Good call. The protection in https://github.com/Automattic/vip-go-mu-plugins/blob/d34e2e93e11135dbccbac573add05e354b988276/rest-api/vip-endpoints.php#L63 can be generalized to cover the entire vip
namespace.
Good call. The protection in https://github.com/Automattic/vip-go-mu-plugins/blob/d34e2e93e11135dbccbac573add05e354b988276/rest-api/vip-endpoints.php#L63 can be generalized to cover the entire
vip
namespace.
Done in https://github.com/Automattic/vip-go-mu-plugins/pull/749, along with adding support for query-string permalinks (because I was there ¯_(ツ)_/¯).
Oh, I guess tests are failing here too. We should definitely fix before merging.
Yeah, the tests have been broken for...a while. Travis wasn't even enabled until yesterday. :)
Tests are fixed in #54, which is meant to be merged into this.
See #50