Commit f307895 1 parent 6ffaf15 commit f307895 Copy full SHA for f307895
File tree 2 files changed +12
-3
lines changed
helm_deploy/laa-access-civil-legal-aid/templates
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ def index():
20
20
return render_template ("index.html" )
21
21
22
22
23
+ @bp .route ("/status" , methods = ["GET" ])
24
+ def status ():
25
+ return "OK"
26
+
27
+
23
28
@bp .route ("/maintenance-mode" , methods = ["GET" ])
24
29
def maintenance_mode_page ():
25
30
if not current_app .config ["MAINTENANCE_MODE" ]:
@@ -86,5 +91,9 @@ def csrf_error(error):
86
91
@bp .before_request
87
92
def maintenance_mode_middleware ():
88
93
maintenance_url = url_for ("main.maintenance_mode_page" )
89
- if current_app .config ["MAINTENANCE_MODE" ] and request .path != maintenance_url :
94
+ exempt_urls = [
95
+ maintenance_url ,
96
+ url_for ("main.status" ),
97
+ ]
98
+ if current_app .config ["MAINTENANCE_MODE" ] and request .path not in exempt_urls :
90
99
return redirect (maintenance_url )
Original file line number Diff line number Diff line change 44
44
protocol : TCP
45
45
livenessProbe :
46
46
httpGet :
47
- path : /
47
+ path : /status
48
48
port : http
49
49
readinessProbe :
50
50
httpGet :
51
- path : /
51
+ path : /status
52
52
port : http
You can’t perform that action at this time.
0 commit comments