Open MocioF opened 6 months ago
Thanks! Added to the project board for triaging.
@MocioF these scripts are not shipped with Playground – we're running a minified WordPress build with define( "CONCATENATE_SCRIPTS", false );
to reduce the initial download size. The web browser downloads them from the physical server where Playground is running, not from the wasm filesystem. Does your plugin rely on such a wp_remote_get
call to load-scripts.php
? What's the use-case?
Hi @adamziel, my plugin uses wp_remote_get to download external scripts it finds when it parses the DOM, to calculate their sha hashes.
@MocioF Aha, thank you for explaining! Is it a caching plugin?
No, it is used to create a strict CSP. So it doesn't cache files, but stores url and hashes
To track this issue, please try this plugins https://github.com/MocioF/test-wp-playground. To test it with wp-now:
With these URLs: https://github.com/MocioF/test-wp-playground/blob/b3677dc27ca54db4599fb7bcbf6889463f1c6807/test-wp-playground.php#L42-L43
wp_remote_get
works on a standard WordPress installation, but fails when you run it on playground.