• Resolved steven.m

    (@stevenmaas)


    I use the Redirection plugin and it shows an error when I Disable JSON REST V2 service. Is there a way to Disable JSON REST V2 service for Non logged-in users like you just implemented for Block any JSON REST calls?

    You recently added Block any JSON REST calls for Non logged-in users. Please do the same for Disable JSON REST V2 service.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Maya

    (@tdgu)

    Hi,
    Thanks for your feedback. We will check into this and implement it for the next plugin version.

    Thanks

    Thread Starter steven.m

    (@stevenmaas)

    In addition to having the option to disable for Non logged-in users have an option to change wp-json in the url. Example code below …

    // Change REST JSON on URL “wp-json”
    
    add_filter( 'rest_url_prefix', function() {
    	return'my-json';
    } );

    Where my-json replaces wp-json in URL.

    After you make the change you have to run once the below to refresh the url…

    flush_rewrite_rules(true);

    This way I can keep active and just hide the commonly used wp-json in url.

    • This reply was modified 3 years, 3 months ago by steven.m.
    • This reply was modified 3 years, 3 months ago by steven.m.
    • This reply was modified 3 years, 3 months ago by steven.m.
    • This reply was modified 3 years, 3 months ago by steven.m.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable JSON REST V2 service for Non logged-in users’ is closed to new replies.