• Resolved medio1

    (@medio1)


    First of all, thank you for the awesome plugin! Great job!

    I want to disable REST API on my wordpress, but it looks like it is used by your plugin.
    I’ve got the plugin, which can disable not the whole REST API, but only some of its methods: Disable REST API – https://ru.www.ads-software.com/plugins/disable-json-api/

    So which of the wordpress REST API methods are used by your plugin and which I can confidently disable?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Perfecty

    (@perfecty)

    Hi, the current rest routes used by our plugin are defined in https://github.com/perfectyorg/perfecty-push-wp/blob/master/public/class-perfecty-push-public.php#L90-L123

    However they will change in 1.7.0, so please have the upcoming change in mind:

    
    		// JS SDK friendly routes
    		register_rest_route(
    			'perfecty-push',
    			'/v1/webpush/(?P<site_id>[a-zA-Z0-9-]+)/subscribers',
    			array(
    				'methods'             => array( 'POST' ),
    				'callback'            => array( $users, 'register' ),
    				'permission_callback' => '__return_true',
    				'args'                => array( 'site_id' => array() ),
    			)
    		);
    		register_rest_route(
    			'perfecty-push',
    			'/v1/webpush/(?P<site_id>[a-zA-Z0-9-]+)/subscribers/(?P<id>[a-zA-Z0-9-]+)/unregister',
    			array(
    				'methods'             => array( 'POST' ),
    				'callback'            => array( $users, 'unregister' ),
    				'permission_callback' => '__return_true',
    				'args'                => array(
    					'site_id'       => array(),
    					'subscriber_id' => array(),
    				),
    			)
    		);
    		register_rest_route(
    			'perfecty-push',
    			'/v1/webpush/(?P<site_id>[a-zA-Z0-9-]+)/subscribers/(?P<id>[a-zA-Z0-9-]+)',
    			array(
    				'methods'             => array( 'GET' ),
    				'callback'            => array( $users, 'get_user' ),
    				'permission_callback' => '__return_true',
    				'args'                => array(
    					'site_id'       => array(),
    					'subscriber_id' => array(),
    				),
    			)
    		);
    
    Thread Starter medio1

    (@medio1)

    Thank you. That’s enough.
    Please don’t forget to list the changes of rest routes in the changelog.
    Good luck!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable REST API’ is closed to new replies.