kgaigl
Aug 14, 2019Cirrocumulus
IRule Maintenance Page only from outside
Hi,
I've got an IRule with a static Maint-Page:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] < 1 } {
switch [HTTP::uri] {
"/mylogo.png" {HTTP::respond 200 content [ifile get "mylogo.png"]}
default {HTTP::respond 200 content {
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
<article>
<img src="/mylogo.png" />
<h1>Wir sind bald wieder für Sie da!</h1>
<div>
<p>Bitte entschuldigen Sie die Unannehmlichkeiten, aber wir führen auf dieser Seite gerade Wartungsarbeiten durch.</p>
<p>Sie können uns jederzeit <a href="mailto:IV-ServiceDesk@versorgungskammer.de">kontaktieren</a>, wir sind aber in Kürze wieder online.</p>
<p>Ihre Informationsverarbeitung</p>
</div>
</article>
}
}
}
}
}
now I need to bypass the Maintenance Page if the request comes from inside the organisation.
there's a data group list "private_net" I think I could use this with
if { ([class match [IP::client_addr] equals "private_net"]) }
but I'm not sure how to combine this,
could someone give me some help?
thanks a lot