1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Commit Graph

121 Commits

Author SHA1 Message Date
Sarah Schneider
7e3e75616c Merge branch 'main' of github.com:github/docs-internal into feature-versioning 2021-06-23 15:59:37 -04:00
James M. Greene
7ee7a1aaaa Merge branch 'main' into feature-versioning 2021-06-22 15:28:34 -05:00
Grace Park
23f586bb93 merge and fix conflicts 2021-06-22 11:41:10 -07:00
Grace Park
d3d1902414 Merge pull request #20017 from github/upgrade-esm
Enforce and Move to Top Level require
2021-06-22 11:27:48 -07:00
Mike Surowiec
a24d01f78a Fix NextJS 500s (#20048)
* feat: allow server to contextualize request when on a /_next/data path

* add client side routing test, run lint

* enable nextjs client side routing
2021-06-22 17:30:40 +00:00
Grace Park
7f6a277a8e clear out dynamic require 2021-06-18 13:08:28 -07:00
Grace Park
b688ac036c update instrument middleware 2021-06-18 12:14:08 -07:00
Grace Park
0762734b43 fixed easy global requires 2021-06-17 18:39:38 -07:00
Sarah Schneider
a1c1a81b94 Merge branch 'main' of github.com:github/docs-internal into feature-versioning 2021-06-15 19:41:29 -04:00
Mike Surowiec
306f6fc75e Enable more react pages (#19935)
* 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
2021-06-15 13:31:17 -07:00
Sarah Schneider
a200a74a0f Merge branch 'main' into support-short-versions 2021-06-14 19:52:04 -04:00
Mike Surowiec
6fbfa7d263 feat: add catch for bad accept-language header, prevent downstream 500 (#19909) 2021-06-14 22:45:29 +00:00
Sarah Schneider
7466e24a9b Merge branch 'main' of github.com:github/docs-internal into support-short-versions 2021-06-11 15:25:20 -04:00
Felicity Chapman
23b0b84111 Add Code security landing and guides pages (#19650) 2021-06-10 20:14:56 +00:00
Sarah Schneider
5d6d2d2cb7 Merge branch 'main' of github.com:github/docs-internal into support-short-versions 2021-06-09 17:00:37 -04:00
Sarah Schneider
d1cf56abd5 add short names = true to context object so we can access them in Liquid conditionals 2021-06-09 16:58:19 -04:00
Sarah Schneider
52daa592d3 Merge branch 'main' of github.com:github/docs-internal into middleware-perf-part2 2021-06-04 13:58:30 -04:00
Sarah Schneider
3a75d49a4f add middleware to enable feature-based versioning 2021-05-28 19:46:18 -04:00
Sarah Schneider
4008de0e4f Merge branch 'main' into github-ae-release-notes 2021-05-28 15:17:35 -04:00
James M. Greene
256a58777a Override helmet's referrerPolicy to enable archived asset proxying (#19624)
Fixes https://github.com/github/docs-internal/issues/19504
2021-05-28 17:02:33 +00:00
Sarah Schneider
ff718d7fc1 Merge branch 'main' of github.com:github/docs-internal into github-ae-release-notes 2021-05-24 10:00:07 -04:00
Sarah Schneider
1945b8a3d4 remove tree rendering middleware now that it happens in warm server 2021-05-21 12:06:53 -04:00
Sarah Schneider
5978edb47b remove feature flagged code 2021-05-20 10:01:33 -04:00
Kevin Heis
f6acb1f08a Update dependencies (#19408)
* Update dependencies 2

* Lint fixes

* Update graphql packages

* Update changelog-entry.json

* Update @octokit/rest

* Update commander with help from @rachmari

@rachmari

* Upgrade helmet

* Upgrade js-yaml

* Update server.js

* Update cheerio

* Revert "Update cheerio"

This reverts commit 8aa17c39fbf564ee554037d89e7a473027d16984.
2021-05-19 17:32:47 +00:00
Mike Surowiec
eaddbc5db7 feat: add nextjs middleware handling (#19139)
* feat: add nextjs middleware handling split

* fix: eslint errors

* fix: filter boolean from csp list

* fix: feature flag nextjs server start

* feat: add prettier rules for ts,tsx files

* fix: remove unnecessary async from next middleware

* fix: next middleware name

* Update tsconfig.json

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Update next-env.d.ts

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* fix: add typescript linting to lint command

* add comment for unsafe-eval, update webpack to use eval in development

* fix: feature flag typo

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-05-05 15:23:46 +00:00
Sarah Schneider
757a5961cc delete no longer needed layout file and middleware 2021-04-26 15:36:08 -04:00
Sarah Schneider
a22691b082 update middleware/categories-for-support 2021-04-21 10:45:37 -04:00
Sarah Schneider
b5ffeb8e73 parse Liquid in titles in siteTree and use full titles in generic TOC but short titles in sidebar 2021-04-20 14:02:12 -04:00
Sarah Schneider
26c351f4ff Merge branch 'main' of github.com:github/docs-internal into update-new-site-tree-deps 2021-04-15 14:46:27 -04:00
Sarah Schneider
d1524b16a5 add feature flagged middleware 2021-04-15 14:46:16 -04:00
Sarah Schneider
18b91cd3b1 Merge branch 'main' into update-categories-json 2021-04-15 10:29:46 -04:00
Sarah Schneider
15ff2e2e98 update categories-for-support-team middleware 2021-04-14 10:34:49 -04:00
Sarah Schneider
1623191243 extract layout handling into separate middleware 2021-04-13 14:24:06 -04:00
Vanessa Yuen
bbd9f03f6e Populate product-landing "What's new" section using GitHub Changelog (#18328)
Co-authored-by: Jason Etcovitch <jasonetco@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
2021-04-08 20:51:37 +00:00
James M. Greene
c940dcd98b Middleware overhaul! (#18218)
* Middleware overhaul!

- Remove unnecessary 'async' keywords from middleware functions
- Ensure all middleware functions we create have names
- Wrap the method contents of all async middleware functions in a try-catch+next(error) pattern

* Use asyncMiddleware wrapper instead of try-catch+next(error) pattern

* Remove unnecessary try-catch+next(error) pattern from context middleware
2021-03-11 01:12:41 +00:00
James M. Greene
92ac830a44 Do not timeout requests during testing (#18206)
* Do not load the timeout middleware during testing

* Run the link-check-server in testing mode to avoid loading the timeout middleware

* Revert the change to 'package.json'

* Also consider GITHUB_ACTIONS to be a testing environment to support the link checkers
2021-03-10 11:40:25 -06:00
James M. Greene
fd7d0eeb1a Add timeout and abort middleware and processing halts (#18177)
* Add middleware to timeout requests after a period

* Add halt-on-dropped-connection middleware to stop the middleware processing stack if the connection was already dropped

* Add a few strategic bail-out spots for dropped connections during the render-page middleware

* Handle 404s and HEAD requests earlier in the page rendering flow

* Add a few more strategic bail-out spots for dropped connections during the render-page middleware

* Add middleware to notice aborted requests

* Add a check for aborted requests into the isConnectionDropped logic

* Reformat comment for consistency

* Handle aborted requests correctly in the error handler

* Explicit returns for consistency
2021-03-09 19:14:02 +00:00
Sarah Schneider
063e22d151 re-combine release notes middleware 2021-03-08 15:03:34 -05:00
Sarah Schneider
8eb1e69586 separate the middleware for enterprise server vs. github-ae release notes 2021-03-01 17:03:33 -05:00
Kevin Heis
1918d2ea14 Inline CSRF token in HTML (#17748)
* Inline CSRF token

* Fix tests
2021-02-09 22:08:24 +00:00
James M. Greene
a40ff31b4b Cache more assets both in browser + Fastly (#17663)
* Cache archived asset JS/CSS for a day

* Don't waste time with ETag calculations

* Add a comment about the expiration length

* Cache images and fonts for a day

* Cache GraphQL data files for a week

* Set Fastly surrogate-key header on all responses

* Update test to account for new response header
2021-02-03 22:16:54 +00:00
James M. Greene
8f133cbf54 Disallow both Fastly AND the browser from caching HTML pages (#17641) 2021-02-02 21:37:41 +00:00
James M. Greene
e53d1b7982 Set cache control for our JS/CSS assets to be kept for 28 days (#17636) 2021-02-02 13:34:37 -06:00
Jason Etcovitch
58319a221c Instrument all of our middleware (#17527)
* Add instrument-middleware.js

* Make it do some fancy require-ing

* Use it

* Prefix names

* dot prefix

* Improve async detection

* Add some comments

* Can't instrument error handler
2021-01-27 17:29:30 -05:00
Vanessa Yuen
9bc90cd932 Learning Track navigation banner (#17440)
* add middleware to handle `learn` query param

* add exception to query-less cache key

* add querystring to learning track guides
2021-01-25 16:57:32 +00:00
Kevin Heis
2fb2e962bc Move site search to use an endpoint (#17359)
* Move site search to use an endpoint

* Update browser.js

* Update search.js

* Update lib/search/versions.js

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Fix URLs

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-01-20 15:37:42 +00:00
Kevin Heis
c62f49aa0e Block indexing not crawling (#17044)
* Block indexing instead of crawling

* Lint

* Update deprecated-enterprise-versions.js

* Combine loops
2020-12-17 11:57:18 -08:00
Jason Etcovitch
eaf2a67fa1 Use connectDatadog(e) (#16888)
* npm i connect-datadog

* Add connectDatadog middleware

* Add comments

* Use DD_API_KEY to gate

Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
2020-12-11 13:13:18 -05:00
Sarah Schneider
cada14981b Merge branch 'main' of github.com:github/docs-internal into list-of-deprecated-versions 2020-12-09 22:05:26 -05:00
Sarah Schneider
3ca261ac82 add Developer deprecated docs to the list and also add a mini-toc 2020-12-08 10:38:39 -05:00