dokuwiki / dokuwiki

The DokuWiki Open Source Wiki Engine
http://www.dokuwiki.org
GNU General Public License v2.0
4.16k stars 853 forks source link

Add a CDN option in configuration #1020

Open nfriedli opened 9 years ago

nfriedli commented 9 years ago

With Amazon CloudFront (and probably with another...), it's really easy to serve static files via a CDN. For example:

  1. I've an image on my website: http://domain.tld/_media/test.jpg
  2. I activate a CloudFront distribution, like http://d3luaahep0xjls.cloudfront.net/ with http://domain.tld source.
  3. So my image is now accessible via http://d3luaahep0xjls.cloudfront.net/_media/test.jpg

To use a CDN, I only need to display a new adress prefix for media files when rendrering the public page: http://d3luaahep0xjls.cloudfront.net/_media/ instead of http://domain.tld/_media/

I would be nice to have a CDN prefix configuration option in DokuWiki, which just add a prefix or replace the canonical domain name.

splitbrain commented 9 years ago

I like that idea. Patches welcome

selfthinker commented 9 years ago

FYI, there was a similar feature request in the old bugtracker: https://bugs.dokuwiki.org/index.php?do=details&task_id=2592

nfriedli commented 9 years ago

Here is a proof of concept ;) https://github.com/nfriedli/dokuwiki/commit/c679aac9a5441ab30b500d7d29f0331ffed95d05

Just have a look here: http://frdl.ch/web/dokuwiki/cdn (in french).

mylylyl commented 6 years ago

It's 2018 and no cdn support yet