Is there a PHP/WordPress equivalent to req.hostname from Node.js/Express to get the hostname of the sender of a request?
I’m working on a WordPress REST API endpoint with the following their setup
I need to retrieve the hostname of the client making the request within the handle_proxy_request function.
I’ve tried using the Referer header, but it’s not secure enough for my needs. Is there a more reliable and secure method to get this information in PHP/WordPress? Any suggestions or alternative methods would be greatly appreciated!
Thanks in advance!