I came across some issues adding some patterns to the jwt_auth_whitelist to whitelist them from auth and when I looked at the plugin code I found a TODO for this very point in JWTAuth::is_whitelisted()
I'm trying to whitelist something with the following pattern:
/wp-json/bdvs/v1/services/(?P\d+)/action
If I add a check that looks something like this I get what I need:
I came across some issues adding some patterns to the jwt_auth_whitelist to whitelist them from auth and when I looked at the plugin code I found a TODO for this very point in JWTAuth::is_whitelisted()
I'm trying to whitelist something with the following pattern:
If I add a check that looks something like this I get what I need:
$regex = '/' . str_replace( '/' , '\/' , $endpoint ) . '/'; if( preg_match( $regex , $request_uri )) { return true; }
I need to use this because I only want to whitelist this route if it has /action on the end of it.
What do you think about adding this in there?