File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ The following secrets need to be created and set before running the application:
3737
3838### Setting up Cloudfront error pages
3939
40- Manually create the following error routes.
40+ Manually create the following error routes. The current library we use doesn't update once created due to lifecycle rules, hence manual.
4141
4242- Go to AWS service "Cloudfront"
4343- Select the distribution that serves VitA website (vaccinations.nhs.uk)
@@ -49,6 +49,12 @@ Manually create the following error routes.
4949 - Response page path: /service-failure
5050 - HTTP Response code: 500
5151- Repeat the previous step for all other 5xx codes.
52+ - Click "Create custom error response" button
53+ - HTTP error code: 403
54+ - Error caching minimum TTL: 0
55+ - Customise error response: yes
56+ - Response page path: /assets/static/service-failure.html
57+ - HTTP Response code: 403
5258
5359### Setting default limits and settings
5460
Original file line number Diff line number Diff line change @@ -111,32 +111,33 @@ <h2 class="nhsuk-u-visually-hidden">Support links</h2>
111111 </ div >
112112 </ div >
113113 </ footer >
114+
114115 < script >
115116 function showComponentsBasedOnDevice ( ) {
116117 window . onload = ( ) => {
117- const handleClick = ( event ) => {
118+ const handleBackLinkClick = ( event ) => {
118119 event . preventDefault ( ) ;
119120 window . nhsapp . navigation . goToPage ( window . nhsapp . navigation . AppPage . SERVICES ) ;
120121 }
121122
122- const handleSkipLink = ( event ) => {
123+ const handleSkipLinkClick = ( event ) => {
123124 event . preventDefault ( ) ;
124125 const contentTitle = document . getElementsByTagName ( "h1" ) . item ( 0 ) ;
125126 contentTitle ?. setAttribute ( "tabindex" , "-1" ) ;
126127 contentTitle ?. focus ( ) ;
127128 }
128129
129130 const skipLink = document . querySelector ( '.nhsuk-skip-link' ) ;
130- skipLink . addEventListener ( 'click' , handleSkipLink ) ;
131+ skipLink . addEventListener ( 'click' , handleSkipLinkClick ) ;
131132
132133 const guidance = document . getElementById ( 'guidance' ) ;
133134 if ( window . nhsapp . tools . isOpenInNHSApp ( ) ) {
134135 // mobile
135136 const backLink = document . querySelector ( '.nhsuk-back-link' ) ;
136137 backLink . style . display = 'block' ;
137138
138- window . nhsapp . navigation . setBackAction ( handleClick ) ;
139- backLink . addEventListener ( 'click' , handleClick ) ;
139+ window . nhsapp . navigation . setBackAction ( handleBackLinkClick ) ;
140+ backLink . addEventListener ( 'click' , handleBackLinkClick ) ;
140141
141142 guidance . innerHTML = 'Go back and try logging in again. If you cannot log in, try again later.' ;
142143 } else {
You can’t perform that action at this time.
0 commit comments