rest api - WordPress RESTAPI - Restrict unknown

admin2025-06-05  4

I am not sure about the technical term for what I am looking. However, I have done this in Laravel using middleware. I am trying to achieve same in WordPress RESTApi.

I am planning to make a site as a service using WordaPress rest api. That I will use for cross platform. Since anyone can access WordPress api it is too dangerous.

I want to block it for public and only who pass the access token (not JWT or oAuth) I wan to allow only them to access API. This how I can limit the access.

So if I make android app and pass the access token, it will have access but anyone who want to make app from my api they want be able to.

I hope I have explained it properly to understand. You can see my middleware code that might help to explain more.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749092077a316294.html

最新回复(0)