-
-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I'd like to demonstrate the WAP plugin using the new WordPress Playgrounds feature. Playgrounds runs a full wordpress instance in your browser using a variety of cool technologies like wasm and node.js. The result is you can one-click install an instance and use their blueprint json to "spin up" a customized wordpress instance that runs in your browser.
Unforutnately our authorization (and maybe licensing) code doesn't work here.
The issue possibly is CORS.
I have turned on networking in the blueprint but for some reason when I try to apply the API keys to our configuration screen nothing happens. Networking is turned on in the blueprint so it should be able to call an external REST API.
Here's my test playground for the plugin WildApricot Press:
We can use your browser console as the debugger, as it’ll show all outgoing HTTP requests. Chances are, is that the WA API endpoint doesn’t allow CORS requests - ie. your browser isn’t allowed to communicate directly with it. If we enable CORS on all api endpoints that your plugin communicates with, it’ll probably be able to work in playground.
If we are getting no output, WAP is probably not handling HTTP request failures gracefully either, so we should probably add some error handling here of we don't have it yet.