Skip to content

Conversation

@Akash-2006
Copy link

Added missisng accept ranges and cachecontrol in _includes/api/en/4x/express.static.md and _includes/api/en/5x/express.static.md

@Akash-2006 Akash-2006 requested a review from a team as a code owner October 29, 2025 02:27
@netlify
Copy link

netlify bot commented Oct 29, 2025

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 5975ffa
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/690b07018bdb0c00086d0d87
😎 Deploy Preview https://deploy-preview-2089--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

🚦 Lighthouse Results (Mobile & Desktop)

URL Device Perf A11y Best Practices
/ mobile 🔴 58 🟢 100 🟢 96
/en/blog/posts.html mobile 🟠 88 🟢 96 🟢 96
/en/5x/api.html mobile 🟢 97 🟢 95 🟢 96
/ desktop 🟢 100 🟢 100 🟢 96
/en/blog/posts.html desktop 🟢 98 🟢 96 🟢 92
/en/5x/api.html desktop 🟢 100 🟢 95 🟢 96

Copy link
Contributor

@efekrskl efekrskl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Could you link this PR to the related issue (e.g "Fixes #????") so it closes automatically when merged? (see)

| `maxAge` | Set the max-age property of the Cache-Control header in milliseconds or a string in [ms format](https://www.npmjs.org/package/ms). | Number | 0 |
| `redirect` | Redirect to trailing "/" when the pathname is a directory. | Boolean | `true` |
| `setHeaders` | Function for setting HTTP headers to serve with the file. <br/><br/>See [setHeaders](#setHeaders) below. | Function | |
| `acceptRanges` | Enable or disable accepting ranged requests. Disabling this will not send the Accept-Ranges header and will ignore the contents of the Range request header. <br/><br/>See [acceptRanges](#acceptRanges) below. | Boolean | true |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be better to put keyword inside backticks e.g Accept-Ranges

Comment on lines 63 to 73
<h5 id='acceptRanges'>acceptRanges</h5>

Enable or disable accepting ranged requests, defaults to true.
Disabling this will not send `Accept-Ranges` and ignore the contents
of the `Range` request header.

<h5 id='cacheControl'>cacheControl</h5>

Enable or disable setting `Cache-Control` response header, defaults to
true. Disabling this will ignore the `immutable` and `maxAge` options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this section adds much, as it is the exact same description we have above

Copy link
Author

@Akash-2006 Akash-2006 Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep done

@Akash-2006 Akash-2006 changed the title added accept ranges and cache control to api docs Fixes #2084 Nov 4, 2025
@efekrskl
Copy link
Contributor

efekrskl commented Nov 4, 2025

Maybe you could put the fixes ... block inside the description of the PR, this way the issue and the PR would be automatically linked 👍 You can then restore the title.

It looks like you accidentally pushed some Gemfile changes. Other than that, looks good!

@Akash-2006
Copy link
Author

Akash-2006 commented Nov 5, 2025

i removed the changes in the Gemfile.PR description i already have the fixes and the isssue number. Can you check it and let me know if everything is good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants