Peter Bengtsson
19b246022a
handle search with colon ( #25128 )
...
* handle search with colon
* nicer 400 errors
* split up by words first to avoid dangerous regex
* code comment
2022-02-15 21:56:50 +00:00
Peter Bengtsson
a867973876
serve /apple-touch-icon.png ( #25371 )
...
* serve apple-touch-icon.png
* rename
* 'directives'
* use a lazy but caching pattern
* update code comment
2022-02-15 21:35:08 +00:00
Peter Bengtsson
07c8fc3c2a
Decouple redirects from language ( #24597 )
...
* experimenting with redirects
* cleanup developer.json
* wip
* clean console.log
* progress
* some progress
* progress
* much progress
* debugging tests
* hacky progress
* ditch latest -> number redirects
* minor
* hacky progress
* lots of progress
* some small fixes
* fix rendering tests
* small fixes
* progress
* undo debugging
* better
* routing tests OK
* more cleaning
* unit tests
* undoing lineending edit
* undoing temporary debugging
* don't ever set this.redirects on Page
* cope with archived version redirects
* adding code comments on the major if statements
* address all feedback
* update README about redirects
* delete invalid test
* fix feedback
2022-02-14 20:19:10 +00:00
Peter Bengtsson
caf0791694
support archived enterprise assets ( #25224 )
...
* support archived enterprise assets
* better tests
2022-02-11 15:58:05 -05:00
Peter Bengtsson
24d3ea6814
remove catch-bad-accept-language middleware ( #25231 )
2022-02-10 18:51:30 +00:00
Peter Bengtsson
5c9a83be7c
Stop doing Gzip in the middleware ( #25227 )
2022-02-10 11:01:56 -05:00
Peter Bengtsson
e535e52280
minimize caching on static asset 404s ( #25192 )
2022-02-09 20:03:15 +00:00
Peter Bengtsson
1f93fe29ee
denormalize archived-redirects-from-213-to-217.json by language ( #24996 )
...
* denormalize archived-redirects-from-213-to-217.json by language
* refactor again
* oops
2022-02-09 18:58:34 +00:00
Peter Bengtsson
a1c78717d5
cache the search API ( #25068 )
...
* cache the search API
* extend tests
2022-02-09 17:21:49 +00:00
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