下次修改 | 前次修改
下次修改兩邊的下次修訂版 |
a10:slb:aflex [2012/11/15 10:52] – 建立 jal | a10:slb:aflex [2014/04/24 16:55] – jal |
---|
====== aFlex sample ====== | ====== A10 aFlex Sample ====== |
| A10 aflex progrem, I worte it myself. |
| |
| ===== HTTP Type Sample Code ===== |
| - [[a10:slb:aflex:http:return-html|Simple aflex Web server]] |
| - [[a10:slb:aflex:http:google-analytics|Insert Google Analytics Script when HTTP respond]] |
| - [[a10:slb:aflex:http:denyip-respond404|Deny Source IP and Response 403]] |
| - [[a10:slb:aflex:http:error-redirect|Redirect to Somewhere when Response 4xx or 5xx]] |
| - [[a10:slb:aflex:http:http-protocol-validation|HTTP Protocol Validation]] |
| |
| ===== DNS Type Sample Code ===== |
| |
| ===== TCP Type Sample Code ===== |
| |
| |
===== Return HTML ===== | |
<code> | |
when HTTP_REQUEST { | |
HTTP::respond 200 content "<html><head><title>GSLB Site 1</title></head> | |
<body>This is GSLB Site 1 http://[HTTP::host][HTTP::uri] | |
<p>IP: local_addr: [IP::local_addr]</p> | |
<p>IP: client_addr: [IP::client_addr]</p> | |
<p>IP: remote_addr: [IP::remote_addr]</p> | |
<p>IP: server_addr: [IP::server_addr]</p> | |
<p>IP: protocol: [IP::protocol]</p> | |
</body></html>" | |
} | |
</code> | |