CDN mapping issue
-
I am using cdn mapping along with wp hide my ghost plugin.
When ever i am checking my loggeding website some of the static files are shown
GET https://my-cloudfront-id.cloudfront.net/wp-content/uploads/astra-addon/astra-addon-67c6a41396e491-96191049.js net::ERR_BLOCKED_BY_ORB 403 (Forbidden)
Please let me know why this error is shown only in logged in users and no error in logged out users
Thank you
-
@rashidavc18
please share a report ID. This can be generated from LSC => Toolbox => Report => click on “Send to Litespeed”
Have you tried disabling WP Hide plugin and see if the error occurs?Report number: IBHTOJQJ
Report date: 03/06/2025 12:19:50
that’s more like how your cloudfront is configured , most likely due to CORS
Hi
Please let me know is there anything i need to check in my cloudfront configurationhttps://repost.aws/en/knowledge-center/cloudfront-troubleshoot-403-errors
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-403-permission-denied.html
well , unfortunately I am not familiar with cloudfront , but I found these guide , perhaps it will help
Actually i am manually uploading statics files like css,js,media to the s3 bucket and uses cloudfront cdn url. .And the cdn mapping is done using lightspeed cache plugin.Every thing works fine until the cdn mapping in hide my ghost plugin is added.
This should be working fine without any modification in cloudfront right
or
Since CloudFront doesn’t know about the path rewrites, i need to create a behavior in CloudFront that mapslib/towp-includes/
I s this how it should be working right?Can you please suggest me.bascially , you need to make sure the path to be same
e.g.
https://domain.com/wp-content/uploads/2025/03/something.jpg
and
https://your_cloudfront.com/wp-content/uploads/2025/03/something.jpg
loads same thing
Hi,
Please let me know whether wp hide my ghost plugin is compatible with lightspeed pluginfrom previous statement , don’t think issue is with wp hide , but more like your cloudfront or bucket configuration about CORS
But before hide wp ghost is enabled every thing works fine.Files are loaded from s3 aws cloudfront without any issue.
The issue appears to be with how CloudFront is trying to locate files based on the rewritten URLs. When WP Hide rewrites URLs from the standard WordPress paths to our custom paths, CloudFront can’t find the files in our S3 bucket because it’s looking for them in the new path structure, not where they actually exist. Here’s what’s happening: 1. Original path in WordPress:/wp-content/plugins/some-plugin/assets/js/webfontloader.min.js2. Rewritten by WP Hide to:/core/modules/966a9fe7d2/assets/js/webfontloader.min.js3. CloudFront looks for this file in S3 at the rewritten path, but it doesn’t exist there
Please let me know How to Configure LightSpeed Cache to respect the WP Hide rewritten URLs but point directly to the correct S3 paths. This way, our HTML references the masked URLs, but the actual requests go to the correct locations in S3.I have checked CORS in configuration.
Thank you-
This reply was modified 1 year, 2 months ago by
rashidavc18.
but shouldn’t cloudfront will reverse proxy it ?
whatever request it receives , it passes to origin to retrieve file ?
Sorry,
i didnt get you
Currently the request is made with the custom path /core/modules/966a9fe7d2/assets/js/webfontloader.min.jsno , I mean , no matter how your sources URI is , the CDN will send same request back to origin and retrieve resources
for example this URI
/2025/03/home-banner-image-e1688999833933.png, it works on both origin URI and cloudfront URI , but some does not , if the error is path changed by wp hide , then all resources should be broken , but if not , it should be some mis-configuration on cloudfrontAll resources are broken once the path changed by wp hide.Without this path change everything loads fine.
how did you set up the cloudfront ? CDN should reverse proxy it , or you upload the resources manually to s3 bucket or something ?
—-update —
no , it must be somethi wrong on your cloudfront setting , e.g.
/wp-content/uploads/astra-addon/astra-addon-67c6a41396e491-96191049.js
this URI , it has NOT modified path , works on origin domain , 403 on cloudfront domain
-
This reply was modified 1 year, 2 months ago by
qtwrk.
-
This reply was modified 1 year, 2 months ago by
The topic ‘CDN mapping issue’ is closed to new replies.