Closed (fixed)
Project:
CDN
Version:
7.x-2.x-dev
Component:
Origin Pull mode
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2011 at 15:51 UTC
Updated:
19 Jun 2013 at 08:38 UTC
Jump to comment: Most recent file
Comments
Comment #1
wim leersI think this is a problem only if you want to use your own vanity domain name as an alias for the cloudfront domain name, no? Then why not just always use the cloudfront domain name?
Comment #2
wim leersOh, I just noticed this was documented at #1047182: Document that HTTPS breaks if one uses a vanity subdomain (CNAME) for a CDN that supports HTTPS requests. It's documented in the admin interface, but only in the dev snapshot, not yet in a release. That will change soon.
Comment #3
bendodd commentedI use vanity domains so that both the code looks better with more connections are to servers people know and trust, but mostly to allow multiple domains to be used, and allow more simultaneous downloads: http://code.google.com/speed/page-speed/docs/rtt.html#ParallelizeDownloads
Comment #4
bendodd commented...this is not possible though for https, as cloudfront only provides one domain
Comment #5
wim leersI thought I'd read somewhere that you'd need unique IP addresses for that too work (meaning that what Google states there, and what many others state, is in fact wrong), but I can't find it. I guess I must have imagined that.
Your use case is obviously valid.
Obviously, I welcome patches. Secondly, I'm wondering what you propose in terms of UI?
Comment #6
bendodd commentedHaven't really thought about the UI, but I'm guessing we need another 'CDN mapping' box (CDN HTTPS mapping?). But there is something odd about having to go to the following tab to indicate support for HTTPS. Perhaps we could move the 'CDN supports HTTPS' select to the previous/same tab?
Comment #7
wim leersI know, but the problem is that most people don't need this, and hence we provide them with a boatload of settings they don't need…
Comment #8
bendodd commentedI guess we only need to show the textarea if the https checkbox is checked? Or move to a sub-module?
Comment #9
bendodd commentedInitial ideas for functionality here: https://github.com/bendodd/drupal-6-cdn/tree/help_https
Just need to move these changes to it's own patch...
Comment #10
wim leersI just replied to #1204400: Supply different CDN hosts for HTTPS, which is strongly related to this.
Comment #11
bendodd commentedWe are working on a patch for this today and will hopefully have it to test tomorrow. It will use a checkbox to reveal a second textarea if needed:
http://drupal.org/files/cdn_admin_details.png
Comment #12
wim leersI think this should be at admin/settings/other; there it could appear below the "CDN supports HTTPS" setting. Doesn't that also make more sense to you?
Comment #13
andreiashu commented@wim re #11, #12: how about having both HTTPS related options on the details page? I think it would make more sense to have the "CDN supports HTTPS" option show the "Select different mappings for HTTPS" option which in turn, when checked, will show the text area with mappings for https?
Comment #14
andreiashu commentedI forgot to mention that I think they would be more useful on the details page because then you would have both http and https mappings on the same screen.
Comment #15
wim leers#13, #14: Yet HTTPS mappings are rarely necessary. The UI is optimized for the common use case.
Comment #16
andreiashu commentedI took bendodd's code, organised it a bit and now we have a patch.
I still need to move the options around in the admin settings area but I'd like a quick review from you guys.
Comment #17
andreiashu commentedNew patch attached which:
- has all the HTTPS related settings on the "other" tab;
- I got rid of the CDN_BASIC_MAPPING_HTTPS_ENABLED_VARIABLE var. We have one less variable_get(set) - on the details page we don't have a checkbox for the normal CDN mappings
Comment #18
andreiashu commentedMinor amend to the previous patch so that it doesn't include whitespace change around '_cdn_ufi_deployment_id' function.
Comment #19
andreiashu commentedRerolled against latest 6.x-2.x branch
Comment #20
andreiashu commentedbump
Comment #21
wim leersThanks for the patch! It contained *a lot* of flaws though.
- it contained changes from previous patches; this forced me to apply all of your changes manually
- the two new public functions you added to the .module file had weird logic checks
- cdn_get_domains() needs the *raw* mappings, but you're passing it the *parsed* mappings through the new cdn_basic_get_mapping() function you've introduced
Reroll attached. Against 6.x-2.x-dev.
Comment #22
andreiashu commentedHi Wim,
Thanks for re-rolling and fixing it. I'll give it a try on Monday.
Comment #23
andreiashu commentedWorks for me: it picks up the files from the https CDN when necessary.
Comment #24
bendodd commentedWith a fresh GIT checkout of the dev branch and this patch applied, I get:
Fatal error: Call to undefined function _cdn_requirements_get_integration_mechanism() in
#######/sites/all/modules/contributed/cdn/cdn.admin.inc on line 20I have also confirm this on a fresh installation at Pantheon (let me know if you want access to the codebase/admin):
http://dev.comicrelief-test.gotpantheon.com
Fatal error: Call to undefined function _cdn_requirements_get_integration_mechanism() in
/srv/bindings/2c15305bc7cd4bed8527316bb254d667/code/sites/all/modules/contrib/cdn/cdn.admin.inc on line 20Comment #25
andreiashu commented@bendodd: please try this patch. The bug was introduced by the advanced help patch: http://drupal.org/node/1413162
Comment #26
bendodd commentedThis patch does fix the issue for me locally and on Pantheon.
Comment #27
wim leersCommitted!
D7: http://drupalcode.org/project/cdn.git/commit/d823a76
D6: http://drupalcode.org/project/cdn.git/commit/9ac54b7
Comment #28
wim leersThis patch causes a WSOD in D7: #1426500: WSOD on admin/config/development/cdn/other. Reason in #1426500-2: WSOD on admin/config/development/cdn/other.
Comment #29
wim leersFixed: http://drupalcode.org/project/cdn.git/commit/aca62e0
Comment #31
doublejosh commentedAwesome. However, the DNS prefetching is still set to the HTTP domain(s).
Comment #32
doublejosh commentedComment #33
ArtActivator.com commentedSubscribing to DNS prefetching...
Comment #34
wim leers#31: please create a new issue for this; don't reopen issues that have been closed such a long time ago, just refer to this one when you do so :)