Version 2.0.0 of CDN Enabler is causing site issues
-
Site assets are being returned as 403.
The code refactor might be causing issues.
-
I’ll need more information to troubleshoot this issue. Can you please provide the before and after URLs so I can see how they’re being rewritten? For example,
https://www.example.com/wp-content/uploads/example.jpg
andhttps://cdn.example.com/wp-content/uploads/example.jpg
. If you don’t want to provide these publicly you can use our contact form while referencing this support thread.Trying to add the following CDN URL.
Reverting to version 1.0.9 fixes the issue.
wp plugin update cdn-enabler --version=1.0.9
Site assets show as being broken in version 2.0.0.
- This reply was modified 3 years, 9 months ago by Luke Cavanagh. Reason: clarify wording
Can you please provide the before and after URLs? That will help me see the original URL and then what it has been rewritten to.
CDN Enabler will only replace the site hostname with the value defined in the CDN Hostname value. That means the file paths need to be correctly pointed at the location you need beforehand.
This will show the after URLs in the waterfall of the site.
In those test results all I see are
200
status codes. In this case, to expedite this process, please provide the following information when using version 2.0.0:- Asset URL before being rewritten.
- Asset URL after being rewritten.
- Screenshot of CDN Enabler settings.
@coreyk
Let me see what I can do only I really do not want to have to break the front-end of the site again.
3.
CDN Hostname
eadn-wc05-3367974.nxedge.io/cdnCDN Inclusions (default)
.avif
.css
.gif
.jpeg
.jpg
.json
.js
.mp3
.mp4
.pdf
.png
.svg
.webpCDN Exclusions (default)
Blank- This reply was modified 3 years, 9 months ago by Luke Cavanagh. Reason: clarify wording
Sounds good. The CDN Hostname setting would be updated to
eadn-wc05-3367974.nxedge.io
upon saving as any file paths will be stripped because they’re not part of the hostname.I may be having a similar problem? When I enable the plugin my CSS isn’t applied to the published page and images don’t show up. When disabled, everything goes back to normal. My CDN hostname is also a nxedge.io url. I’m not sure how to find the asset urls before or after being rewritten.
I would have support revert the CDN Enabler plugin on your site.
@lukefiretoss After checking the test and website in more detail I see what’s occurring in version 2.0.0:
Asset URL before being rewritten:
curl -I https://barefootceylon.com/wp-content/uploads/2020/04/Barefoot-Menu-Logo-PNG-e1608006959618.png HTTP/2 200 server: nginx date: Thu, 11 Feb 2021 20:47:05 GMT content-type: image/png content-length: 3985 vary: X-Forwarded-Proto last-modified: Thu, 14 Jan 2021 22:19:32 GMT etag: "f91-5b8e3a660c500" cache-control: max-age=31536000, public expires: Fri, 11 Feb 2022 20:47:05 GMT referrer-policy: no-referrer-when-downgrade access-control-allow-origin: * pragma: public link: <https://barefootceylon.com/wp-content/uploads/2020/04/Barefoot-Menu-Logo-PNG-e1608006959618.png>; rel="canonical" x-cache-nxaccel: MISS accept-ranges: bytes
Asset URL after being rewritten:
curl -I https://eadn-wc05-3367974.nxedge.io/wp-content/uploads/2020/04/Barefoot-Menu-Logo-PNG-e1608006959618.png HTTP/2 404 date: Thu, 11 Feb 2021 20:47:54 GMT content-type: text/html; charset=UTF-8 content-length: 146 server: Nexcess.net Edge CDN x-edge-server: eadn-wc01-sea x-edge-region: us-west-x x-request-id: req-3158-1613076474.787-198.54.131.166-96-3367974-
It’s returning a
404
error because the correct path would include/cdn
, for example:curl -I https://eadn-wc05-3367974.nxedge.io/cdn/wp-content/uploads/2020/04/Barefoot-Menu-Logo-PNG-e1608006959618.png HTTP/2 200 date: Thu, 11 Feb 2021 20:49:29 GMT content-type: image/png content-length: 3985 vary: X-Forwarded-Proto last-modified: Thu, 14 Jan 2021 22:19:32 GMT etag: "f91-5b8e3a660c500" cache-control: max-age=31536000, public expires: Fri, 11 Feb 2022 20:49:29 GMT referrer-policy: no-referrer-when-downgrade access-control-allow-origin: * pragma: public link: <https://barefootceylon.com/wp-content/uploads/2020/04/Barefoot-Menu-Logo-PNG-e1608006959618.png>; rel="canonical" x-cache-nxaccel: MISS accept-ranges: bytes server: Nexcess.net Edge CDN x-edge-server: eadn-wc01-sea x-edge-region: us-west-x x-request-id: req-3157-1613076569.008-198.54.131.166-99-3367974- x-edge: MISS
Can you please check with your team why you use a subdirectory in your CDN? We can easily adjust CDN Enabler to account for this as it’s possible others want the same behavior, but that’s quite an odd decision in my opinion. Furthermore, there is odd behavior with your CDN, for example look where this is redirecting if being accessed over HTTP instead of HTTPS (same thing occurs with a
GET
request):curl -I https://eadn-wc05-3367974.nxedge.io/cdn/wp-content/uploads/2020/04/Barefoot-Menu-Logo-PNG-e1608006959618.png HTTP/1.1 301 Moved Permanently Date: Thu, 11 Feb 2021 20:50:08 GMT Content-Type: text/html; charset=iso-8859-1 Content-Length: 343 Connection: keep-alive Keep-Alive: timeout=5 Location: https://barefootceylon.com/home/a114909f/7f06aa5653.nxcli.net/html/wp-content/uploads/2020/04/Barefoot-Menu-Logo-PNG-e1608006959618.png Cache-Control: max-age=3600 Expires: Thu, 11 Feb 2021 21:50:08 GMT X-Cache-NxAccel: MISS Server: Nexcess.net Edge CDN X-Edge-Server: eadn-wc01-sea X-Edge-Region: us-west-x X-Request-ID: req-3160-1613076607.963-198.54.131.166-164-3367974- Access-Control-Allow-Origin: * X-Edge: MISS
That is only being returned from the origin server when the request is made through your CDN as far as I can tell, for example:
curl -I https://barefootceylon.com/wp-content/uploads/2020/04/Barefoot-Menu-Logo-PNG-e1608006959618.png HTTP/1.1 200 OK Server: nginx Date: Thu, 11 Feb 2021 20:53:44 GMT Content-Type: image/png Content-Length: 3985 Connection: keep-alive Last-Modified: Thu, 14 Jan 2021 22:19:32 GMT ETag: "f91-5b8e3a660c500" Cache-Control: max-age=31536000, public Expires: Fri, 11 Feb 2022 20:53:44 GMT Referrer-Policy: no-referrer-when-downgrade Access-Control-Allow-Origin: * Pragma: public Link: <https://barefootceylon.com/wp-content/uploads/2020/04/Barefoot-Menu-Logo-PNG-e1608006959618.png>; rel="canonical" X-Cache-NxAccel: MISS Accept-Ranges: bytes
@coreyk
All of the Nexcess CDN URLs have CDN in the URL. Could the CDN Enabler plugin be updated not to remove that from the CDN Hostname when it is saved?
@coreyk
Any ETA on when an updated version to fix the issue could be released?
@coreyk
[aae1c4f5@cloudhost-75284 ~]$ curl -I https://eadn-wc02-3286781.nxedge.io/cdn/wp- content/uploads/2021/02/BOLD-DRINKS-scaled.jpg HTTP/1.1 200 OK Date: Thu, 11 Feb 2021 22:27:02 GMT Content-Type: image/jpeg Content-Length: 371651 Connection: keep-alive Keep-Alive: timeout=5 Last-Modified: Wed, 03 Feb 2021 11:18:07 GMT ETag: "5abc3-5ba6cbdd7087f" X-Cache-NxAccel: MISS Accept-Ranges: bytes Server: Nexcess.net Edge CDN X-Edge-Server: eadn-wc01-ams X-Edge-Region: nl-north-x X-Request-ID: req-14173-1613082422.761-185.145.13.66-145-3286781- Access-Control-Allow-Origin: * X-Edge: MISS
- This reply was modified 3 years, 9 months ago by Luke Cavanagh. Reason: clarify wording
If the setting requires a hostname the input will validated as a hostname.
CDN Enabler is doing what is says it will do, which is rewrite the site hostname with the CDN hostname. We can add support for this use case through an enhancement. I will need a short period of time to come up with the right solution.
As for the information I provided about your CDN it’s not related to CDN Enabler or the issue referenced in this support thread. I was just letting you know of the odd responses I received when troubleshooting in case it’s helpful.
- The topic ‘Version 2.0.0 of CDN Enabler is causing site issues’ is closed to new replies.