зеркало из https://github.com/github/docs.git
306f6fc75e
* enable more react landing pages * move nextjs page logic to separate middleware * enable codespaces landing page + fixes * enable /education * enable /admin * use pathToRegexp to match routes for react rendering * run lint * fix: typo in url * update sidebar test |
||
---|---|---|
.. | ||
contextualizers | ||
redirects | ||
README.md | ||
abort.js | ||
archived-enterprise-versions-assets.js | ||
archived-enterprise-versions.js | ||
block-robots.js | ||
catch-bad-accept-language.js | ||
categories-for-support.js | ||
connect-datadog.js | ||
context.js | ||
cookie-parser.js | ||
cors.js | ||
csp.js | ||
csrf.js | ||
detect-language.js | ||
dev-toc.js | ||
disable-caching-on-safari.js | ||
events.js | ||
featured-links.js | ||
find-page.js | ||
halt-on-dropped-connection.js | ||
handle-csrf-errors.js | ||
handle-errors.js | ||
handle-invalid-paths.js | ||
index.js | ||
is-next-request.js | ||
learning-track.js | ||
loaderio-verification.js | ||
next.js | ||
rate-limit.js | ||
record-redirect.js | ||
render-page.js | ||
req-utils.js | ||
robots.js | ||
search.js | ||
set-fastly-cache-headers.js | ||
set-fastly-surrogate-key.js | ||
timeout.js | ||
trigger-error.js | ||
webpack.js |
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:
- contextualizers modify the
req.context
object that is used to render pages. - redirects handle... redirects!