dmchale / disable-json-api

Public repo for the "Disable REST API" WordPress plugin, currently with 90,000+ active installs in the wordpress.org repository
10 stars 9 forks source link

Whitelist does not work for subsite when plugin is network enabled #27

Closed CHadetz closed 4 years ago

CHadetz commented 4 years ago

My custom endpoint (whitelisted on subsite) returns 401 when the plugin is network activated. If I enable the plugin on the subsite only the whitelist works as expected.

Network activated -> domain.com/subsite/endpoint -> 401 Single site activated -> domain.com/subsite/endpoint -> 200

dmchale commented 4 years ago

Hi @CHadetz thanks for the report! Do you have a link to a public environment where I could take a look at this happening? Any additional information you're willing to provide would be much appreciated. Thanks!

CHadetz commented 4 years ago

Actually I re-activated the plugin on network and everything seems to be working normally. I don't even know anymore. This issue might be irrelevant. Thanks anyways.

dmchale commented 4 years ago

Hi @CHadetz haha no worries, that happens to the best of us! Perhaps you were still logged in as a user when you were testing different settings from the admin? Reminder that the plugin will ONLY blacklist endpoints for non-authenticated users, but if you're logged in as any type of user at all then you'll default back to the route's default behavior.

I'm going to close this Issue for now, but please feel free to update if you find anything amiss later that may be a bug we should investigate. Cheers!