May 2012
Beginner to intermediate
246 pages
4h 39m
English
A Limiter endpoint takes care of unwanted side effects in a space.[43]
Consider the following rootspace definition:
<rootspace
name="Limiter Demo - Services"
public="true"
uri="urn:org:netkernelbook:chapter2:limiter:services">
<fileset>
<regex>res:/etc/system/SimpleDynamicImportHook.xml</regex>
</fileset>
<fileset>
<regex>res:/limiterdemo/(.*)</regex>
<rewrite>res:/resources/$1</rewrite>
</fileset>
</rootspace>The functionality of this rootspace could be described as providing access to anything in the resources directory.
With the following content for SimpleDynamicImportHook.xml, that means you provide access to anything in the resources directory to the whole wide world.[44]
<connection> <type>HTTPFulcrum</type> </connection>
Let us also create a couple of things in the resources directory. First, there’s a file limiter_demo_allowed.txt:
http://periodicvideos.com/ http://www.sixtysymbols.com/
There’s also a file limiter_demo_not_allowed.xml.
<general> <password>ThisIsThePasswordIUseEverywhere</password> </general>
<rootspace name="Limiter Demo - Services" public="true" uri="urn:org:netkernelbook:chapter2:limiter:services"> <fileset> <regex>res:/etc/system/SimpleDynamicImportHook.xml</regex> </fileset> <fileset> <regex>res:/limiterdemo/(.*)</regex> <rewrite>res:/resources/$1</rewrite> </fileset> <endpoint> <prototype>Limiter</prototype> <grammar>res:/limiterdemo/ ...
Read now
Unlock full access