Plugin Support
qtwrk
(@qtwrk)
how exactly does it break ? like CDN resources not loading up or something ?
I’m using the Hide My Ghost plugin to rename file paths. For example, it renames:
/wp-content/themes/woodmart/ → core/templates/template1
My CDN is configured to use the renamed paths, like:
cdnurl/core/templates/template1
However, this renaming doesn’t apply to Customizer pages, where the file paths remain in their default form, such as:
cdnurl/wp-content/themes/woodmart/css/parts/woo-opt-bordered-product.min.css?ver=8.1.2
As a result, these default paths cause a 403 error, since the files aren’t located in my S3 bucket under those original paths.
Screenshot: https://prnt.sc/SKzl3krkNa6V
-
This reply was modified 11 months, 2 weeks ago by
rashidavc18.
Plugin Support
qtwrk
(@qtwrk)
emmm? but doesn’t that seems to be hide my ghost plugin issue ? like it didn’t properly replace the URLs in customizer page ?
Yes i understand.
But can you please let me know if there is a possibility to disable cdn for customizer pages.
Thank you
Plugin Support
qtwrk
(@qtwrk)
function disable_cdn_on_customize() {
if ( strpos($_SERVER['REQUEST_URI'], '/wp-admin/customize.php') !== false ||
(isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], '/wp-admin/customize.php') !== false)
)
{
do_action('litespeed_conf_force', 'cdn', false);
}
}
add_action('litespeed_init', 'disable_cdn_on_customize');
please try this