1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Commit Graph

469 Commits

Author SHA1 Message Date
Peter Bengtsson
94d976c1fa faster 404 for missing static assets (#25124) 2022-02-08 18:30:07 +00:00
Peter Bengtsson
8cea28a9b0 use manual surrogate key for nextjs static assets (#25096)
* use manual surrogate key for nextjs static assets

* refactor
2022-02-08 00:01:38 +00:00
Peter Bengtsson
f33ab1cf89 set 'manul-purge' surrogate key on assets/cb- URLs (#25028) 2022-02-04 11:55:40 -05:00
Peter Bengtsson
5252288755 archived asset redirects (#25025) 2022-02-04 16:32:01 +00:00
Peter Bengtsson
cc79340595 cache individual renderContent instead of page.render (#24955)
* cache individual renderContent() instead of page.render()

* remove commented code

* unbreak unit tests
2022-02-03 16:56:05 +00:00
Peter Bengtsson
6361591c45 serve a /favicon.ico (#24935)
* serve a /favicon.ico

* fix exception

* avoid res.sendFile() bcause CodeQL is worried
2022-02-03 00:11:59 +00:00
Mike Surowiec
2be0c5e09b Remove help-to-docs redirect; it's handled by fastly now (#24870) 2022-02-01 15:49:08 +00:00
Peter Bengtsson
896439c3c3 unbreak thinking the site's in AIRGAP mode (#24863) 2022-02-01 14:30:14 +00:00
Mike Surowiec
26829bbae2 Update logging format for azure (#24830)
* update logging format for azure
2022-01-31 16:54:39 +00:00
Peter Bengtsson
7acccdac9b load webhook versions at runtime instead of import-time (#24788)
* load webhook versions at runtime instead of import-time

* fix tests
2022-01-28 18:27:00 +00:00
Mike Surowiec
c5c148ab80 Use the same tags across connect-datadog and hot-shots (#24741)
* use the same tags across connect-datadog and hot-shots
2022-01-27 21:31:35 +00:00
Peter Bengtsson
b0586d0e09 don't allow data: in script-src (#24730) 2022-01-27 18:28:00 +00:00
Peter Bengtsson
9512ea52d3 graphql-explorer.githubapp.com is no more (#24720) 2022-01-27 16:08:01 +00:00
Peter Bengtsson
acf3699ff3 wrap 'rest' middleware in asyncMiddleware (#24636) 2022-01-25 23:10:18 +00:00
Kevin Heis
cd958e350e Cache all pages in-memory (#24555) 2022-01-24 18:39:25 +00:00
Peter Bengtsson
c42823af9d use 302 when redirecting from enterprise-server@latest to enterprise-server@<version> (#24494)
* use 302 when redirecting from enterprise-server@latest to enterprise-server@<version>

* correct tests
2022-01-21 17:10:09 +00:00
Peter Bengtsson
bc73bde6e5 Fix exclusion of English search indexes (#24501)
* debug search on stage

* debugging more

* keep more

* try again
2022-01-21 17:00:30 +00:00
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