<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://jal.tw/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>脆笛酥的家 - a10:slb:aflex:http</title>
        <description></description>
        <link>https://jal.tw/</link>
        <lastBuildDate>Sat, 02 May 2026 09:20:43 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://jal.tw/_media/wiki:dokuwiki.svg</url>
            <title>脆笛酥的家</title>
            <link>https://jal.tw/</link>
        </image>
        <item>
            <title>denyip-respond404</title>
            <link>https://jal.tw/a10:slb:aflex:http:denyip-respond404?rev=1398354287&amp;do=diff</link>
            <description>Deny Source IP and Response 403

	*  Using aFlex to deny some source IP and response 403

Requirement

	*  Service Type: HTTP / HTTPS

Code


when HTTP_REQUEST {
  if { [IP::addr [IP::client_addr] equals 8.8.8.8 ] } {
    HTTP::respond 404
  }
}</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 24 Apr 2014 15:44:47 +0000</pubDate>
        </item>
        <item>
            <title>error-redirect</title>
            <link>https://jal.tw/a10:slb:aflex:http:error-redirect?rev=1398354819&amp;do=diff</link>
            <description>Redirect to Somewhere when Response 4xx or 5xx

	*  When server response 4xx or 5xx, then redirect(aka:302) to somewhere.

Requirement

	*  Service Type: HTTP / HTTPS

Code


when HTTP_RESPONSE {
  if { [HTTP::status] starts_with &quot;2&quot; || [HTTP::status] starts_with &quot;3&quot;} {
    # Just fast pass that to decrease process
  } elseif { [HTTP::status] contains &quot;404&quot;} {
    HTTP::redirect &quot;http://www.au.edu.tw&quot;
  } elseif { [HTTP::status] contains &quot;403&quot;} {
    HTTP::redirect &quot;http://www.au.edu.tw&quot;
  } els…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 24 Apr 2014 15:53:39 +0000</pubDate>
        </item>
        <item>
            <title>google-analytics</title>
            <link>https://jal.tw/a10:slb:aflex:http:google-analytics?rev=1398354129&amp;do=diff</link>
            <description>Insert Google Analytics Script when HTTP Response

	*  This aFleX collects the HTTP response and insert Google Analytics script before &lt;/head&gt;

Requirement

	*  Service Type: HTTP / HTTPS

Code


# jal.20140421: this aFleX collects the HTTP response and insert google analytics script before &lt;/head&gt;
when HTTP_REQUEST {
  # remove &quot;Accept-Encoding&quot; header to make sure server doesn&#039;t send compressed response
  # (this is done automatically in Rel 2.6.1 and later)
  if { [HTTP::header exists &quot;Accept…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 24 Apr 2014 15:42:09 +0000</pubDate>
        </item>
        <item>
            <title>http-protocol-validation</title>
            <link>https://jal.tw/a10:slb:aflex:http:http-protocol-validation?rev=1398360491&amp;do=diff</link>
            <description>HTTP Protocol Validation

	*  Only accept right FDQN request, otherwise deny or redirect it to portect your real server.
	*  Useful to clean HTTP (port 80) robot scan.
	*  Deny not acceptable HTTP method
	*  Deny incorrect HTTP version

Requirement</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 24 Apr 2014 17:28:11 +0000</pubDate>
        </item>
        <item>
            <title>redirect-domain-uri</title>
            <link>https://jal.tw/a10:slb:aflex:http:redirect-domain-uri?rev=1418057438&amp;do=diff</link>
            <description>Redirect to new domain

	*  Redirect to new production site, except some uri.

Requirement

	*  Service Type: HTTPS or HTTP

aFlex Code


when HTTP_REQUEST {
	if { [HTTP::host] eq &quot;tw.test.website.com&quot;} {
		if { [HTTP::uri] starts_with &quot;/story&quot; } {
			# do nothing
		} elseif { [HTTP::uri] starts_with &quot;/maple&quot; } {
			# do nothing
		} elseif { [HTTP::uri] starts_with &quot;/uri&quot; } {
			# do nothing
		} else {
			if { [TCP::local_port] eq 80 } {
				HTTP::redirect &quot;http://tw.website.com[HTTP::uri]&quot;
			}…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 08 Dec 2014 16:50:38 +0000</pubDate>
        </item>
        <item>
            <title>return-html</title>
            <link>https://jal.tw/a10:slb:aflex:http:return-html?rev=1398364911&amp;do=diff</link>
            <description>Simple Web Server

	*  Even though not set service group or real server, when slb received http request response a simple page and some system variable.

Requirement

	*  Service Type: HTTP / HTTPS

Code


# Simple Web Server
when HTTP_REQUEST {
  HTTP::respond 200 content &quot;
    &lt;html&gt;
      &lt;head&gt;
        &lt;title&gt;A10 SLB Site 1&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
        This is SLB Site 1 http://[HTTP::host][HTTP::uri]&lt;br /&gt;
        &lt;br /&gt;
        remote_addr (Source IP) =&gt; local_addr (Virtual I…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 24 Apr 2014 18:41:51 +0000</pubDate>
        </item>
    </channel>
</rss>
