aws-amplify / aws-amplify/amplify-hosting
Properly serving a gzipped file I'm including in build directory.
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
I am including a gzipped json file in my build holder. The app isn't working correctly because when it fetches the gzipped json, it is not being handled properly by the browser because it doesn't come with a ```content-encoding: gzip``` header. Is it possible to set this header?
I tried to set the content-encoding header but I get the error:
Invalid spec, yaml parsing error:
```Invalid spec,can not specify a readonly header in customHeaders. Readonly headers are: [content-length, transfer-encoding, content-encoding, warning, via]```
Contributor guide
Research direction
Start by reproducing the build-directory request for the gzipped JSON file and review how customHeaders handles the readonly content-encoding header. The issue mentions no source files or tests, so identify the hosting entry point responsible for serving included files. Done means the browser receives the gzipped file with the correct content-encoding behavior without triggering the customHeaders validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100