<?xml version="1.0"?>
<yxorpconfig>

<!--

  This configuration snip is intended to be merged into the sample Yxorp configuration
  as shipped with the distribution. It is a part of the Yxorp tutorial, that may be
  found in the documentation directory.

  Demonstration of basic authentication
    
-->


<!-- request rule that will check and modify a request -->

<rule id="rule1" type="request">
<![CDATA[

if (Host: ~/^[a-z\.]+$/) {
   Host: = "yxorp.sourceforge.net";
} else if (Host: ~/^[0-9\.]+$/) {
   reject("You are not allowed access through the IP address of this server");
} else {
  Host: = "yxorp.sourceforge.net";
}

if (uri ~/^\/yxorpdoc.*$/) {
   basic_auth_check("my-realm", "local");
}

]]>
</rule>

<basicauth realm="my-realm" userid="aladdin" passwd="sesame" />

</yxorpconfig>
