1
0
mirror of synced 2025-12-23 21:07:12 -05:00
Commit Graph

452 Commits

Author SHA1 Message Date
dependabot[bot]
acc178e571 Bump express-rate-limit from 5.5.1 to 6.0.4 (#24046)
* Bump express-rate-limit from 5.5.1 to 6.0.4

Bumps [express-rate-limit](https://github.com/nfriedly/express-rate-limit) from 5.5.1 to 6.0.4.
- [Release notes](https://github.com/nfriedly/express-rate-limit/releases)
- [Changelog](https://github.com/nfriedly/express-rate-limit/blob/master/changelog.md)
- [Commits](https://github.com/nfriedly/express-rate-limit/compare/v5.5.1...v6.0.4)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* MemoryStore()

* better

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-01-18 20:02:59 +00:00
Peter Bengtsson
fd32d3a4e2 fix local dev with Safari (#24205)
* fix local dev with Safari

* refactoring

* refactoring
2022-01-11 17:41:20 +00:00
Rachael Sewell
a340162d84 reorganize repository apis (#23728)
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-01-11 11:53:12 +10:00
Peter Bengtsson
4e4b2d25c0 Next v12 (#24082)
* next v12

* stick to exact

* avoid segfault
2022-01-07 18:34:10 +00:00
Rachael Sewell
0da2942dd3 remove storybook (#24122) 2022-01-06 12:11:58 -08:00
Peter Bengtsson
d15d4a29a2 delete disableCachingOnSafari middleware (#24094) 2022-01-06 14:45:56 +00:00
Mike Surowiec
6e2ee359dc Enable morgan logging in azure deployed environments (#24066)
* enable morgan logging in azure deployed environments

* include note about heroku logging
2022-01-05 18:06:11 +00:00
Peter Bengtsson
454375234e Mini-toc rendered twice for special case GraphQL pages (#24041) 2022-01-04 17:47:27 +00:00
Robert Sese
a2bd8ae67f Add support for videos to landing pages (#23801)
* Add new video properties frontmatter

* Handle video links in the middleware

* Video links don't have intros, authors, or full titles

* Make videos available from context

* Add default video heading

* Add basic tests for videos

* tmp videos test

* Remove stray test debugging

* more tmp videos testing

* Add videos test fixture

* Revert "more tmp videos testing"

This reverts commit 382946a5603ff217014797f77f37216bb8bb6c9c.

* Revert "tmp videos test"

This reverts commit 8767d0eaf08bd4ca04e2dacd12d476a2506c0367.
2021-12-17 11:09:00 -06:00
Kevin Heis
4be9444023 Cache API pages attempt 2 (#23762)
* Update render-page.js

* Update render-page.js

* Update render-page.js

* Update render-page.js

* Consistently use const path = req.pagePath || req.path

* Update render-page.js

* Run memory cache even on test and CI

* feedbacked

* Add an exception for caching the GraphQL Explorer

See https://github.com/github/docs-internal/pull/19611

* pretty-fy

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-12-16 18:14:02 +00:00
Peter Bengtsson
9782b804a0 refactor redirecting specifically for the old query string key (#23749)
* refactor redirecting specifically for the old query string key

* fix tests
2021-12-16 13:09:37 +00:00
Rachael Sewell
45f1a41e79 prerender graphql mutations page (#23757) 2021-12-15 12:28:39 -08:00
Peter Bengtsson
26f4a568d4 spot-content-flaws middleware (#23451)
* spot-content-flaws

* now with 100% more color

* use kleur instead
2021-12-15 20:21:15 +00:00
Peter Bengtsson
75a85da692 insight into which page has what page.render statsd timer (#23747) 2021-12-15 20:12:26 +00:00
Kevin Heis
553ebdd18a Revert "In memory cache api pages (#23751)" (#23753)
This reverts commit fc08215278.
2021-12-15 19:48:45 +00:00
Kevin Heis
fc08215278 In memory cache api pages (#23751) 2021-12-15 11:21:03 -08:00
Mike Surowiec
0faa5ce618 remove unused file (#23748) 2021-12-15 17:29:29 +00:00
Peter Bengtsson
b96f16e44e too often we don't know the path of 503'ing requests (#23744)
* Too often we don't know the path of 503'ing requests

* actually, use both
2021-12-15 17:25:32 +00:00
Peter Bengtsson
10ca315bd5 Static assets should set ETag and Last-Modified (#23459)
* Static assets should set ETag and Last-Modified

* tests to prevent this ever happening again

* fix tests

Co-authored-by: docubot <67483024+docubot@users.noreply.github.com>
2021-12-15 16:57:39 +00:00
Mike Surowiec
d51ba61456 Add /healthz endpoint for liveness / readiness probe (#23716) 2021-12-14 21:24:10 +00:00
Rachael Sewell
daafb8cb9d break up large rest pages (#23652) 2021-12-14 20:39:25 +00:00
Peter Bengtsson
d42023d52d cache /categories.json (#23635) 2021-12-13 21:30:38 +00:00
Peter Bengtsson
51e1b14c4e improve test debugging and loading of cached redirects json file (#23584)
* improve test debugging and loading of cached redirects json file

* exception for testing 500 page itself
2021-12-13 16:20:05 +00:00
Peter Bengtsson
6363640cb1 in-memory cache the changelog RSS downloads (#23582)
* in-memory cache the changelog RSS downloads

* fix tests
2021-12-11 16:52:27 -05:00
Peter Bengtsson
ae3dadfc66 cache asset images more aggressively (#23553)
* cache asset images more aggressively

* more careful about which gets the manual surrogate key

* fix rendered-content-link-checker script too

* feedbacked
2021-12-10 13:01:48 +00:00
Peter Bengtsson
77f298f225 301 redirects should not set-cookie (#23360)
* 301 redirects should not set-cookie

Part of #1316

* Update release-notes.js

* No public facing doc changes (#23355)

Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>

* New translation batch for pt (#23362)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/fix-translation-errors.js

* Run script/i18n/lint-translation-files.js --check parsing

* Run script/i18n/lint-translation-files.js --check rendering

* run script/i18n/reset-known-broken-translation-files.js

* Check in pt CSV report

* 24h cache all internal redirects without language prefix (#23354)

Part of #1271

* Redirects for root path should not set-cookie in all supported languages (#23377)

* test: add case when unsupported language is specified in redirect

* test: assert root redirects to appropriate language preference if specified

* refactor: remove redundant unit test

* refactor: re-order units starting with affirmative case

* refactor: remove single-use variable from unit

* fix: re-include previous unit with udpated description

Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Rogan Ferguson <40493721+roferg@users.noreply.github.com>
Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>
Co-authored-by: docubot <67483024+docubot@users.noreply.github.com>
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
2021-12-09 16:31:27 +00:00
Peter Bengtsson
5d5e280f57 faster contextualize() by doing things once (#23526) 2021-12-09 16:04:56 +00:00
Peter Bengtsson
600808702c remove the 'expose' context variable (#23527) 2021-12-09 15:56:25 +00:00
Peter Bengtsson
7b5711e095 cache archived enterproxy proxy responses much longer (#23456)
* cache archived enterproxy proxy responses much longer

* Update middleware/archived-enterprise-versions.js

Co-authored-by: Rachael Sewell <rachmari@github.com>

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-12-08 19:55:12 +00:00
Peter Bengtsson
cc32869294 Archived enterprise proxying should have a timeout (#23467) 2021-12-08 13:50:54 +00:00
Peter Bengtsson
53e3077973 use 302 when redirecting from without language prefix (#23409)
Part of #1312
2021-12-07 14:07:11 +00:00
Peter Bengtsson
e3fda9943f more efficient language redirectPatterns middleware (#23412)
* more efficient language redirectPatterns middleware

Part of #1322

* feedbacked
2021-12-07 13:32:27 +00:00
Peter Bengtsson
9a7a8a761e make lib/rest/index.js callable (#23214)
* Experiment with making the tarball smaller

Part of #1248

* try this

* stop debugging

* delete translations too

* delete heavy search indexes too

* push and popd

* try this hack

* delete but leave directory

* debug more

* faster delete of translations

* less loud

* async await

* async await

* no tree

* simplify

* experimenting more

* unfinished

* only the large files

* change order

* brotli with level 6

* cope better with decorated rest json files

* tidying

* keep images

* cleaning

* cleaning up

* refactored function

* try this

* better comment

* remove console logging

* more important changes

* make lib/rest/index.js callable

Part of #1177

* memoize

* remove console logging
2021-12-07 13:21:23 +00:00
Peter Bengtsson
7c66d4456f static assets should not use csrf (Set-Cookie) (#23357)
* static assets should not use csrf (Set-Cookie)

Part of #1316

* move setFastlySurrogateKey up too
2021-12-06 13:00:34 +00:00
Peter Bengtsson
ddd14479c5 24h cache all internal redirects without language prefix (#23354)
Part of #1271
2021-12-03 21:51:04 +00:00
Peter Bengtsson
913b761c05 Measure how much proxying we're doing (#23175)
Part of #1284
2021-12-02 18:11:40 +00:00
Peter Bengtsson
014c24d78b use got to send to Hydro (#23286) 2021-12-02 04:30:44 +00:00
Peter Bengtsson
1c4d326116 Make the staging files, for deployments, as lean as possible (#23049)
* Experiment with making the tarball smaller

Part of #1248

* try this

* stop debugging

* delete translations too

* delete heavy search indexes too

* push and popd

* try this hack

* delete but leave directory

* debug more

* faster delete of translations

* less loud

* async await

* async await

* no tree

* simplify

* experimenting more

* unfinished

* only the large files

* change order

* brotli with level 6

* cope better with decorated rest json files

* tidying

* keep images

* cleaning

* cleaning up

* refactored function

* try this

* better comment

* remove console logging

* more important changes

* improved fs.accessSync check
2021-12-01 19:01:46 +00:00
Peter Bengtsson
fee73bf04f lazy-load large archived redirects json files (#23176)
* lazy-load large archived redirects json files

Part of #1178

* refactored
2021-11-30 20:56:18 +00:00
Peter Bengtsson
5c2777a8f6 aggressive cache-control on archived redirects (#23091)
Part of #1271
2021-11-30 13:17:17 +00:00
Peter Bengtsson
3d366eb070 cache download of archived redirects.json (#23090)
Part of #1272
2021-11-28 16:50:49 +00:00
Grace Park
71f9433476 Robots update (#23046)
* update to allow only if docs.github.com

* update if

* update for test
2021-11-23 18:56:05 +00:00
Peter Bengtsson
c622faf636 effectiveDate might be falsy (#23002)
Part of #1185
2021-11-19 19:19:13 +00:00
Peter Bengtsson
79f36416aa statsd increments on middleware.abort and middleware.timeout (#23003)
* statsd increments on middleware.abort and middleware.timeout

* tags

* for the abort increment too

* for the abort increment too (2)
2021-11-19 12:04:54 -05:00
Peter Bengtsson
fab5bef972 Avoid an infinite FailBot.report() loop (#22837)
* Avoid an infinite FailBot.report() loop

Part of #1221

* Update middleware/events.js

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

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2021-11-16 01:05:03 +00:00
Rachael Sewell
bd7d82b550 fallback to English page when translation unavailable (#22638) 2021-11-05 09:43:47 -07:00
Kevin Heis
8fa63c31a2 Fix recording redirects (#22534)
* Update record-redirect.js

* Update record-redirect.js
2021-11-02 20:16:36 +00:00
Kevin Heis
d6d40a974e 500 on /en/enterprise-server@2.16/admin (#22532)
* 500 on /en/enterprise-server@2.16/admin

* Update release-notes.js
2021-11-02 18:24:32 +00:00
Robert Sese
a14787956c Only interested in current version's guides (#22535) 2021-11-02 12:04:04 -05:00
Kevin Heis
dca7e56c3d More hydro error info (#22533)
* Add more info to hydro failures

* Clean up

* Update hydro.js

* Move hydro names to event schema file

* Update hydro.js
2021-11-02 16:13:48 +00:00