Content of Admin panel is exposed it CDN and not very usable this way. As a local workaround I simply added to cdn.module at the begining of

function cdn_file_url_alter(&$uri) {

if (\Drupal::currentUser()->isAnonymous() === false) {
  return;
  // Anonymous user...
}

Probably a better solution would be to add into /admin/config/services/cdn a list with available roles with checkboxes "enable CDN for this role". Default role set (anonymous, authenticated and administrator roles) seems to be a good starting point.

Comments

k.ladutenko created an issue. See original summary.

Wim Leers’s picture

Category: Feature request » Support request
Status: Active » Postponed (maintainer needs more info)

There are two possible answers here, with each their own question:

  1. The CDN module does have "duplicate content prevention" logic, to avoid serving HTML responses from the CDN. However, to detect a CDN, it inspects the CDN's user agent. Currently, it only supports Amazon CloudFront and Akamai. Which CDN are you using?
  2. Then: from the project page:

    This module provides easy Content Delivery Network integration for Drupal sites. It changes file URLs, so that files (CSS, JS, images, fonts, videos …) are downloaded from a CDN instead of your web server.

    It does not put your entire website behind a CDN.

    So, are you sure you're using the CDN module in the intended way, i.e. to serve files, or are you trying to use it to serve the entire site from a CDN?

Wim Leers’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Without a response, there's nothing I can do. When you do reply, please change the status to Active again.