Windows: use Boost 1.59, msvc 14.0
[metaproxy-moved-to-github.git] / etc / config-rewrite.xml
1 <?xml version='1.0'?>
2 <metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
3   <start route="start"/>
4   <routes>
5     <route id="start">
6 <filter type='http_rewrite'>
7   <request verbose="1">
8     <rule name="null"/>
9     <rule name="url">
10       <rewrite
11           from='(?&lt;proto>https?://)(?&lt;pxhost>[^ /?#]+)/(?&lt;pxpath>[^ /]+)/(?&lt;host>[^ /]+)(?&lt;path>[^ ]*)'
12           to='${proto}${host}${path}' />
13       <rewrite from='(?:Host: )(.*)' to='Host: ${host}' />
14     </rule>
15     <content type="headers">
16       <within header="link" rule="null"/>
17       <within reqline="1" rule="url"/>
18     </content>
19   </request>
20   <response verbose="1">
21     <rule name="null"/>
22     <rule name="url">
23       <rewrite from='foo' to='bar'/>
24       <rewrite from='^cx' to='cy'/>
25       <rewrite
26           from='(?&lt;proto>https?://)(?&lt;host>[^/?# &quot;&apos;>]+)/(?&lt;path>[^  &quot;&apos;>]+)'
27           to='${proto}${pxhost}/${pxpath}/${host}/${path}' />
28     </rule>
29     <content type="headers">
30       <within header="link" rule="url"/>
31     </content>
32     <content type="html" mime="text/xml|text/html">
33       <within tag="body" attr="background" rule="null"/>
34       <within tag="script" attr="#text" type="quoted-literal" rule="url"/>
35       <within tag="style" attr="#text" rule="url"/>
36       <within attr="href,src" rule="url"/>
37       <within attr="onclick" type="quoted-literal" rule="url"/>
38     </content>
39     <content type="quoted-literal" mime=".*javascript">
40       <within rule="url"/>
41     </content>
42   </response>
43 </filter>
44     </route>
45   </routes>
46 </metaproxy>