div>
<pre><code>paths:
  &quot;/&quot;:
    mruby.handler: |
      acl {
        allow { addr == &quot;127.0.0.1&quot; }
        deny { user_agent.match(/curl/i) &amp;&amp; ! addr.start_with?(&quot;192.168.&quot;) }
        respond(503, {}, [&quot;Service Unavailable&quot;]) { addr == malicious_ip }
        redirect(&quot;https://example.com/&quot;, 301) { path =~ /moved/ }
        use Htpasswd.new(&quot;/path/to/.htpasswd&quot;, &quot;realm&quot;) { path.start_with?(&quot;/admin&quot;) }
      }
    file.d