Encrypting custom REST endpoint
-
Hi,
I was wondering if someone could help me with register_rest_route.
I have a route setup and working properly with some custom fields being returned via GET. Even though the site is SSL enabled I need to add encryption to the response so that a normal SSL user cannot view the plaintext version of the json response.
I’m using RNCryptor:
https://github.com/RNCryptor/RNCryptor-phpSo at the end of my custom function I do:
$new2 = $cryptor->encrypt($new, $password);
return $new2;But the site never returns any data. What are the formats and limits of data returned through register_rest_route? Can I pass a long plaintext?
Any other ideas how I should go about do this?
- The topic ‘Encrypting custom REST endpoint’ is closed to new replies.