-
-
Notifications
You must be signed in to change notification settings - Fork 61
Description
I was looking for documentation on how to do this, and well... the page is currently blank.
So here is what you need to do in order to get this to work at a bare minimum.
Login to the AWS Console
https://{region}.console.aws.amazon.com/console/home?region={region}.
Navigate to your Apps
https://{region}.console.aws.amazon.com/amplify/apps
Select the App with the PWA
https://{region}.console.aws.amazon.com/amplify/apps/{id}/overview
On the left hand side look for: Hosting and click Rewrites and redirects
https://{region}.console.aws.amazon.com/amplify/apps/{id}/redirects
In the upper right corner, look for the button that says Manage redirects
https://{region}.console.aws.amazon.com/amplify/apps/{id}/redirects/edit
In the Source address for type 200 (rewrite) , edit the value so that it includes both manifest and webmanifest and then save.
My full Source Address for 200 Rewrite
</^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|woff2|ttf|map|json|manifest|webmanifest)$)([^.]+$)/>
Next head to the Custom headers and cache on the left hand side navigation
https://{region}.console.aws.amazon.com/amplify/apps/{id}/headers
Click the edit button in the upper right hand corner and paste the following and then click save.
customHeaders:
- pattern: /manifest.webmanifest
headers:
- key: Content-Type
value: application/manifest+json
Additionally, you can/should probably just add the customHttp.yml to your projects root directory (not src). The next time it is deployed the custom headers will get added.
Hopefully this is helpful to someone, as I know I was at a loss for what to do.