Closed frankinspace closed 1 year ago
Correction: We do NOT enable static website hosting. We just create the 404 page and upload it to our site bucket. Then we let NGAP know the name of the document and submit a NASD ticket.
No changes are required for our terraform.
After some investigation it became apparent that a more complicated solution may be needed here to do this properly. The solution for now will be to set the error page for 403 and 404 to use index.html
. This will cause the requests to be handled by the react app and display the NotFound page as expected. However, this is not an ideal solution as it causes client redirects and interferes with SEO (see discussion https://stackoverflow.com/a/70059194).
@viviant100 Please submit the NASD ticket with the following information:
CloudFront URL: swodlr.podaac.sit.earthdatacloud.nasa.gov Error Code: 403, 404 Path under podaac-svc-sit-swodlr-ui: index.html Transformed error code: 200
We will want a similar ticket for UAT
Follow on enhancement ticket opened to address the issues with using index.html
as the error page: https://github.com/podaac/swodlr-ui/issues/56
CloudFront URL: swodlr.podaac.sit.earthdatacloud.nasa.gov Error Code: 403, 404 Path under podaac-svc-sit-swodlr-ui: index.html Transformed error code: 200
Done: https://bugs.earthdata.nasa.gov/servicedesk/customer/portal/7/NASD-3835.
Create a 404 page that is shown by default when there is a page not found.
I believe we will have to enable static website hosting on the s3 bucket: https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html
Which can be done via terraform: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration