When using HTTPS with CDN, the http is replaced to show https in the URL string. The CSS files aggregated by this module are usually built under http so whether http or https are being used, the http version of the CSS files are always used with the http urls for css images. When building the files, both versions must be created and then served differently depending on whether http or https is currently being used.
I submitted issue number 1204400 on the CDN module with a patch that will better support HTTPS on CDN by providing a different list instead of just swapping. The current way it is coded as well as my patch both rely on the page being served using HTTPS at the time. There isn't a way to get on demand https links. This will most likely have to change for this integration to work.
Let me know if there is any way I can help.
Comment | File | Size | Author |
---|---|---|---|
#5 | cdn-build_css_cache_https-1212184-5.patch | 1.11 KB | divThis |
Comments
Comment #1
chriscalip CreditAttribution: chriscalip commentedI'll accept a patch; or i'll put this on my to-do list.. been a bit busy with d7 stuff.
Comment #2
andreiashu CreditAttribution: andreiashu commentedI think this is due to the fact that Adv Aggregator doesn't call the
hook_advagg_css_alter
hook on HTTPS pages after it generated the bundle already on a HTTP only page. See this ticket: #1461492: Bundler/Adv Aggregator serves the same bundles for HTTPS pages as for HTTP onesComment #3
andreiashu CreditAttribution: andreiashu commentedCan anyone test the patch that I posted in Advagg issue queue to see if it fixes this problem (it did for me): http://drupal.org/node/1461492#comment-5676070
Comment #4
chriscalip CreditAttribution: chriscalip commentedParallel CSS deprecated -- CDN now has this modules functionality.
Comment #5
divThis CreditAttribution: divThis commentedThis issue appears to still be unresolved. A patch is attached which should remedy the issue.
Comment #6
Wim LeersI was going to say:
But that won't work if there's a different HTTPS CDN. So #5 looks good to me.
Comment #7
Wim LeersThe comments should be proper sentences though. Other than that, the only thing still needed, is review by at least one more person.
Also marking this as a *feature* request, because this is in fact a feature that's also not supported by Drupal core.
Comment #8
chriscalip CreditAttribution: chriscalip commentedWim,
My apologies; I thought this was in parallel_css queue. I see this mistake has been corrected. Good Good..
Comment #9
Wim Leers@chriscalip: it was, but an analogous bug apparently exists in the CDN module, so it's fine :) Most definitely no harm done ;) :)
Comment #10
Wim Leers#5 (@divThis') patch was for D7. I backported it to D6.
Note that this patch effectively makes it impossible to serve *one* set of CSS files when using protocol-relative (
//cdn.com
) URLs which can in theory be used to serve the exact same CSS files to both HTTP and HTTPS users. However, since this is such a rare edge case, that's fine.- D7: http://drupalcode.org/project/cdn.git/commit/117239e
- D6: http://drupalcode.org/project/cdn.git/commit/8451c85
Comment #12
JeremyFrench CreditAttribution: JeremyFrench commentedI think I may have to reopen this.
I am using CDN for HTTP only, however the CDN generated files are being used for HTTPS pages. So although the CSS is not an http link images in the CSS are links to http assets on the CDN. They should go to local files in this case.
The css link is
https://mysite.com/sites/mysite/files/css/cdn_css_5qtf0Pb77_v0NEdGtFWz_fDEifI5jSB4SwzTke6xS-0.css
This is the same that is generated for the HTTP request so images in it are
http://mycdn.com/prefix/myimage.png
This is causing newer versions of chrome to give warnings about insecure pages. Is that a regression of this bug or something new?
Comment #13
Wim LeersPlease create a new issue and refer to this one. This issue was almost a year old! Reopening it will only cause confusion.