Daisy documentation
 PreviousHomeNext 
10.10 Configuring upload limitsBook Index10.12 Going live

10.11 Include Permissions

Daisy allows to do inclusions in documents. This can be either other Daisy documents (through the "daisy:" syntax) or when published through the Daisy Wiki, any URL resolvable by Cocoon (the framework on which the Daisy Wiki is implemented). However, allowing document authors to include any arbitrary URL might introduce security issues. For example, one could retrieve content from the file system using a "file:" URL. Also, the "http:" URLs are resolved behind the firewall (if any) which might be a problem too.

Therefore, by default, all external inclusions are disallowed. You can give access for certain schemes or URLs through a configuration file. This file is located at:

<wikidata directory>/external-include-rules.xml

This file has a <rules> root element containing <rule> children:

<?xml version="1.0"?>
<rules>
  <rule ... />
  <rule ... />
</rules>

Each rule element can have the following attributes:

There are two possibilities:

Evaluation of the rules:

Example:

<?xml version="1.0"?>
<rules>
  <rule scheme="http" value="uri" matchType="stringIgnoreCase"
        matchValue="http://www.somehost.com/somefile.xml" permission="grant"/>
  <rule scheme="http" value="ip" matchType="wildcard" matchValue="67.19.2.*"
        portFrom="80" portTo="80" permission="grant"/>
  <rule scheme="http" value="host" matchType="stringIgnoreCase"
        matchValue="blogs.cocoondev.org" permission="deny"/>
  <rule scheme="cocoon" value="uri" matchType="wildcardIgnoreCase"
        matchValue="cocoon://daisy/ext/**" permission="grant"/>
  <rule scheme="file" value="uri" matchType="subdir"
        matchValue="/home/bruno/tmp" permission="grant"/>
</rules>

Some more notes on the matchtypes:

Further notes:

 PreviousHomeNext 
10.10 Configuring upload limits10.12 Going live