Forum Discussion

1 Reply

  • Hi kh1,

    this iRule should do. With or without ASM.

     

     

    when HTTP_REQUEST priority 500 {
        set content "<html>
                        <head>
                            <title>Go away!</title>
                        </head>
                        <body>
                            <h1>Go away!</h1>
                            <p>This page is for authorized users only.</p>
                        </body>
                    </html>"
        if { ([HTTP::host] eq "hostname.xyz.com") and ([HTTP::uri] starts_with "/function/party/function-engine/v2/fuction/events-messages") } {
            switch -glob -- [class match [IP::client_addr] eq dg_allowed_ipaddress] {
                "1" {
                    return
                }
                default {
                    HTTP::respond 403 -version auto content $content noserver
                }
            }
        } else {
            return
        }
        unset -- content
    }

     

     

    You need a datagroup of the type Address, in this iRule called dg_allowed_ipaddress.

    KR
    Daniel