You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/rules/snippets/examples/maintenance.mdx
+31-12Lines changed: 31 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,30 +12,33 @@ title: Maintenance page
12
12
description: Serve a custom maintenance page instead of fetching content from the origin server or cache. Ideal for downtime notifications, planned maintenance, or emergency messages.
13
13
---
14
14
15
+
## Snippet code
16
+
15
17
```js
16
18
// Define your customizable inputs
17
19
conststatusCode=503;
18
20
consttitle="We'll Be Right Back!";
19
-
constmessage="Our site is currently undergoing scheduled maintenance. We’re working hard to bring you a better experience. Thank you for your patience and understanding.";
21
+
constmessage=
22
+
"Our site is currently undergoing scheduled maintenance. We’re working hard to bring you a better experience. Thank you for your patience and understanding.";
| IP Source Address | is not in list |`admin_ips`|
119
+
120
+
If you are using the Expression Editor, enter the following expression:
121
+
122
+
```txt
123
+
(not ip.src in $admin_ips)
124
+
```
125
+
126
+
The [IP list](/waf/tools/lists/custom-lists/#ip-lists)`admin_ips` was previously created and contains the list of IP addresses of the site administrators, which will be able to access the site during the maintenance period.
0 commit comments