parse-community / parse-community/parse-server
Possibility to set Cache-Control for files served by the standard FilesRouter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
Referencing the closed issue #1857 which has been closed without being apparently solved, I'm looking for a way to set the Cache-Control header for files served with the standard parse server configuration, that is files which are stored on MongoDB through gridfs.
A great solution would be to be able to specify a default value for all the answers given by the FilesRouter and to further fine tune it with key-value pairs 'file extension' - 'Cache-Control value'.
I couldn't find any mention of such an option in the documentation, apart for files delivered through the S3 adapter. This seems to be an important feature when using a CDN, am I missing something such as a possibility to do it over parse through express ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names the standard FilesRouter, MongoDB GridFS storage, the S3 adapter documentation, and Express as the places to investigate. Compare how the S3 adapter handles Cache-Control with the standard FilesRouter; done should provide a documented default and file-extension override if that design is accepted, with the behavior covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, node.js
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100