• Resolved rashidavc18

    (@rashidavc18)


    hi
    when connecting with static cdn aws s3 cloudfront the customiser pages are brocken.i want to prevent loading the customiser page from cdn.Please let me know how to do this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support qtwrk

    (@qtwrk)

    how exactly does it break ? like CDN resources not loading up or something ?

    Thread Starter rashidavc18

    (@rashidavc18)

    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 ?

    Thread Starter rashidavc18

    (@rashidavc18)

    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

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Customiser issue’ is closed to new replies.