Opened 13 years ago
Last modified 12 years ago
#8243 confirmed Bug
CKEDITOR assumes basepath will include protocol — at Initial Version
Reported by: | airtonix | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
As far as client side resources are concerned, a Django 1.3 project can describe two important context variables :
- STATIC_URL : This is where we access all files that aren't generated by server side logic and are required by the interface clientside logic or appearance.
- MEDIA_URL This is where all resources for client side usage that were uploaded by users is accessed.
keeping site theme files separate from user uploads means we can host them from different domains (usually subdomains of the root)
something.org static.something.org files.something.org
So now onto the problem I'm having with CKEditor :
I define my STATIC_URL and MEDIA_URL like so :
something.org files.something.org static.something.org
What this does for me is reduce the amount of HTTPS <> HTTP wrangling behind the scenes.
However, CKeditor fails to load for me becuase you're codebase assumes the BASE_PATH for ckeditor will explicitly be prefixed by a protocol. Sure i can change the STATIC_URL and MEDIA_URL to :
http://something.org http://files.something.org http://static.something.org
but now keeping the site secure and preventing session cookie bleed-over is a great deal more difficult.
tl;dr : Don't make assumptions about the URL from which you load ckeditor.