Skip to content

Commit 97e21b2

Browse files
Merge branch 'gh-pages' into 1421-docs-clean
2 parents 29e10c1 + 53b9a0e commit 97e21b2

17 files changed

+36
-540
lines changed

_includes/api/en/4x/app-use.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ mounting middleware.
7979
<tr>
8080
<td>Path</td>
8181
<td markdown="1">
82-
This will match paths starting with `/abcd`:
82+
Matches the exact path `/abcd` and any sub-paths starting with `/abcd/` (for example, `/abcd/foo`):
83+
8384

8485
```js
8586
app.use('/abcd', function (req, res, next) {

_includes/api/en/4x/res-clearCookie.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<h3 id='res.clearCookie'>res.clearCookie(name [, options])</h3>
22

3-
Clears the cookie specified by `name`. For details about the `options` object, see [res.cookie()](#res.cookie).
3+
Clears the cookie with the specified `name` by sending a `Set-Cookie` header that sets its expiration date in the past.
4+
This instructs the client that the cookie has expired and is no longer valid. For more information
5+
about available `options`, see [res.cookie()](#res.cookie).
6+
7+
<div class="doc-box doc-warn" markdown="1">
8+
If the `maxAge` or `expires` options are set, the cookie may not be cleared depending on the time values provided,
9+
as Express does not ignore these options. It is therefore recommended to omit these options when calling this
10+
method. Passing these two options has been deprecated since Express v4.20.0.
11+
</div>
412

513
<div class="doc-box doc-notice" markdown="1">
614
Web browsers and other compliant clients will only clear the cookie if the given

_includes/api/en/5x/app-use.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ mounting middleware.
8080
<tr>
8181
<td>Path</td>
8282
<td markdown="1">
83-
This will match paths starting with `/abcd`:
83+
Matches the exact path `/abcd` and any sub-paths starting with `/abcd/` (for example, `/abcd/foo`):
84+
8485

8586
```js
8687
app.use('/abcd', (req, res, next) => {

_includes/api/en/5x/res-clearCookie.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<h3 id='res.clearCookie'>res.clearCookie(name [, options])</h3>
22

3-
Clears the cookie specified by `name`. For details about the `options` object, see [res.cookie()](#res.cookie).
3+
Clears the cookie with the specified `name` by sending a `Set-Cookie` header that sets its expiration date in the past.
4+
This instructs the client that the cookie has expired and is no longer valid. For more information
5+
about available `options`, see [res.cookie()](#res.cookie).
6+
7+
<div class="doc-box doc-notice" markdown="1">
8+
The `expires` and `max-age` options are being ignored completely.
9+
</div>
410

511
<div class="doc-box doc-notice" markdown="1">
612
Web browsers and other compliant clients will only clear the cookie if the given
7-
`options` is identical to those given to [res.cookie()](#res.cookie), excluding
8-
`expires` and `maxAge`.
13+
`options` is identical to those given to [res.cookie()](#res.cookie)
914
</div>
1015

1116
```js

_includes/head.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<meta name="viewport" content="width=device-width, initial-scale=1">
55
<link
66
rel="preload"
7-
href="/fonts/open-sans/woff2/OpenSans.woff2"
7+
href="/fonts/open-sans/woff2/open-sans-latin-wght-normal.woff2"
88
as="font"
99
type="font/woff2"
1010
crossorigin
1111
/>
1212
<link
1313
rel="preload"
14-
href="/fonts/open-sans/woff2/OpenSans-Italic.woff2"
14+
href="/fonts/open-sans/woff2/open-sans-latin-wght-italic.woff2"
1515
as="font"
1616
type="font/woff2"
1717
crossorigin

en/guide/using-middleware.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from: "/guide/using-middleware.html"
1010

1111
Express is a routing and middleware web framework that has minimal functionality of its own: An Express application is essentially a series of middleware function calls.
1212

13-
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/4x/api.html#req) (`req`), the [response object](/{{ page.lang }}/4x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. The next middleware function is commonly denoted by a variable named `next`.
13+
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/5x/api.html#req) (`req`), the [response object](/{{ page.lang }}/5x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. The next middleware function is commonly denoted by a variable named `next`.
1414

1515
Middleware functions can perform the following tasks:
1616

@@ -34,7 +34,7 @@ You can also load a series of middleware functions together, which creates a sub
3434

3535
<h2 id='middleware.application'>Application-level middleware</h2>
3636

37-
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/4x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
37+
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/5x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
3838

3939
This example shows a middleware function with no mount path. The function is executed every time the app receives a request.
4040

@@ -249,9 +249,9 @@ functions that were previously included with Express are now in separate modules
249249

250250
Express has the following built-in middleware functions:
251251

252-
- [express.static](/en/4x/api.html#express.static) serves static assets such as HTML files, images, and so on.
253-
- [express.json](/en/4x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
254-
- [express.urlencoded](/en/4x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
252+
- [express.static](/en/5x/api.html#express.static) serves static assets such as HTML files, images, and so on.
253+
- [express.json](/en/5x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
254+
- [express.urlencoded](/en/5x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
255255

256256
<h2 id='middleware.third-party'>Third-party middleware</h2>
257257

fonts/FontAwesome.otf

-83.9 KB
Binary file not shown.

fonts/fontawesome-webfont.eot

-54.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)