Skip to content

Commit 8e273e2

Browse files
Akash-2006efekrsklbjohansebas
authored
docs(express.static): add accept-ranges and cache-control options to express.static (#2089)
Co-authored-by: Akash-2006 <[email protected]> Co-authored-by: efekrskl <[email protected]> Co-authored-by: bjohansebas <[email protected]>
1 parent cbcd172 commit 8e273e2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,4 +277,4 @@ DEPENDENCIES
277277
webrick
278278

279279
BUNDLED WITH
280-
2.5.16
280+
2.5.16

_includes/api/en/4x/express.static.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ See also the [example below](#example.of.express.static).
3030
| `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 |
3131
| `redirect` | Redirect to trailing "/" when the pathname is a directory. | Boolean | `true` |
3232
| `setHeaders` | Function for setting HTTP headers to serve with the file. <br/><br/>See [setHeaders](#setHeaders) below. | Function | |
33+
| `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.| Boolean | true |
34+
| `cacheControl` | Enable or disable setting the `Cache-Control` response header. Disabling this will ignore the immutable and maxAge options. | Boolean | true |
3335

3436
</div>
3537

_includes/api/en/5x/express.static.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ See also the [example below](#example.of.express.static).
2828
| `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 |
2929
| `redirect` | Redirect to trailing "/" when the pathname is a directory. | Boolean | `true` |
3030
| `setHeaders` | Function for setting HTTP headers to serve with the file. <br/><br/>See [setHeaders](#setHeaders) below. | Function | |
31+
| `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.| Boolean | true |
32+
| `cacheControl` | Enable or disable setting the Cache-Control response header. Disabling this will ignore the immutable and maxAge options. | Boolean | true |
3133

3234
</div>
3335

0 commit comments

Comments
 (0)