kevin cowan - 2016-09-04

In the most recent release, I've added support for RESTful services, custom headers, and CORS. You can add a custom header for any given action like so:

  <action path="/Test"
                forward="/Test.soy"
                task="net.cytopia.tofu.tasks.TestTask"
                token="test"
                bean="scraper"
                >
               <headers>
                   <header key="Access-Control-Allow-Origin" value="*"/>
                   <header key="X-Custom-Header" value="Success" />
               </headers>
           </action>
       So the action is pretty much the same as it has always been, but there is the addition of the 'headers' element, with 1 or more 'header' elements with a key/value pair.  This header will sent when the action is requested.
 

Last edit: kevin cowan 2016-09-04