docs/middleware
Robert Sese b9ee89fc46
Add redirects for language-less homepage requests (#20494)
* Redirect homepage to user's language

* Redirect URLs with no language code

* Add leading forward slash

* Revert "Redirect URLs with no language code"

This reverts commit f817ac1136ea0c7e11c4d61327a4445b56a2f5d6.

* Simplify per @zeke

* Add homepage language redirect tests

* Update middleware/redirects/handle-redirects.js

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>

* braces are good

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2021-08-05 21:46:57 +00:00
..
contextualizers fix: use named export for all-versions (#20478) 2021-07-22 19:29:00 +00:00
redirects Add redirects for language-less homepage requests (#20494) 2021-08-05 21:46:57 +00:00
README.md Hello git history spelunker! 2020-09-27 14:10:11 +02:00
abort.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
archived-enterprise-versions-assets.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
archived-enterprise-versions.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
block-robots.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
catch-bad-accept-language.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
categories-for-support.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
connect-datadog.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
context.js Remove `import x` statements (#20594) 2021-07-29 20:28:30 +00:00
cookie-parser.js Remove `import x` statements (#20594) 2021-07-29 20:28:30 +00:00
cors.js Remove `import x` statements (#20594) 2021-07-29 20:28:30 +00:00
csp.js Removing algolia (#20633) 2021-08-05 13:10:51 -04:00
csrf.js Remove `import x` statements (#20594) 2021-07-29 20:28:30 +00:00
detect-language.js Remove `import x` statements (#20594) 2021-07-29 20:28:30 +00:00
disable-caching-on-safari.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
events.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
featured-links.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
find-page.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
halt-on-dropped-connection.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
handle-csrf-errors.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
handle-errors.js Removing webpack build step (#20405) 2021-07-22 09:11:30 -07:00
handle-invalid-paths.js Add some path blockers for malicious requests (#20577) 2021-07-29 15:57:34 +00:00
handle-next-data-path.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
index.js Remove FEATURE_NEXTJS Flag Part 1 (#20176) 2021-07-16 14:54:25 -07:00
is-next-request.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
learning-track.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
loaderio-verification.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
next.js fix: filter hidden pages from the currentProductTree (SidebarProduct) (#20404) 2021-07-20 12:32:35 -04:00
package.json Migrate CommonJS to ESM (#20301) 2021-07-14 13:49:18 -07:00
rate-limit.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
record-redirect.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
render-page.js Remove all code related to Redis page caching (#20457) 2021-07-21 20:44:00 +00:00
req-utils.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
robots.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
search.js Removing algolia (#20633) 2021-08-05 13:10:51 -04:00
set-fastly-cache-headers.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
set-fastly-surrogate-key.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
timeout.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00
trigger-error.js Pretty format (#20352) 2021-07-14 14:35:01 -07:00

README.md

Middleware

Each file in this directory exports an Express Middleware function.

For more info, see https://expressjs.com/en/guide/using-middleware.html

Subdirectories

There are subdirectories for different types of middleware: