Mike Surowiec
8baf00154f
disable per-request logging in production ( #28056 )
...
* disable per-request logging in production
* cleanup log disabling
Co-authored-by: Peter Bengtsson <mail@peterbe.com >
2022-05-31 21:34:10 +00:00
Peter Bengtsson
107d1d9176
understanding when the archived fallback redirects are used ( #28128 )
2022-05-31 18:27:44 +00:00
Peter Bengtsson
0340760554
remove spotContentFlaws middleware ( #28068 )
2022-05-31 18:19:16 +00:00
Peter Bengtsson
31c3fc36b2
don't fail on posting comment from English link checker ( #28059 )
...
* don't fail on posting comment from English link checker
* small correction on line break and longer timeout patience
* feedbacked
2022-05-31 18:05:39 +00:00
Peter Bengtsson
ca5e538c1b
correct statsd prefix for cache full rendering ( #27983 )
2022-05-25 10:53:09 -04:00
Peter Bengtsson
75c0ec5cab
/en/ permanent redirects to /en should be CDN cacheable (#27976 )
2022-05-25 13:51:16 +00:00
Peter Bengtsson
9bef33aec4
let front door handle invalid paths ( #27954 )
2022-05-24 18:30:05 +00:00
Peter Bengtsson
5874a9c13b
Don't bother render-caching if no next data script ( #27944 )
2022-05-24 15:39:33 +00:00
Mike Surowiec
fac6d5a85c
feat: remove sigsci ( #27932 )
2022-05-24 09:49:19 -05:00
Peter Bengtsson
bb9bfac634
increase overload protection max delay to 500ms ( #27912 )
...
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com >
2022-05-24 00:42:59 +00:00
Peter Bengtsson
bfd9ae0aed
fast root redirect ( #27925 )
2022-05-23 21:36:58 +00:00
Peter Bengtsson
e53f40cfc6
Optimize rendering cache ( #27917 )
...
* Optimize rendering cache
* deleted the wrong return
* put it back
* oops. thanks eslint
2022-05-23 18:32:05 +00:00
Peter Bengtsson
18504871b9
cache full rendering ( #25424 )
...
* cache full rendering
* still not working with gzip
* progress progress progress
* smaller
* hacky progress
* small fixes
* wip
* lock file
* wip
* wip
* package-lock updates
* wip
* search DOM in lowercase
* simplify
* with instrument
* improve test coverage
* mutateCheeriobodyByRequest
* fix
* remove renderContentCacheByContex
* disable render caching in sync-search
* diables things in github/github link checker
* gzip lru
* tidying up
* updated
* correct tests
* fix: move userLanguage to LanguagesContext
* Revert "fix: move userLanguage to LanguagesContext"
This reverts commit d7c05d958c71eaad496eb46764eb845d80b866ca.
* contexts ftw
* fixed rendering tests
* oops for got new file
* nits addressed
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com >
2022-05-23 12:12:09 +00:00
brannon
295de2e979
Change cache test env vars to read from HTTP headers instead.
2022-05-19 15:33:09 -06:00
brannon
6f5255cb92
Add comments explaining the purpose of the fastly-cache-test middleware.
2022-05-19 14:50:56 -06:00
brannon
b3ca430d48
Add env var to control stale cache parameters
2022-05-19 13:15:18 -06:00
brannon
671b9a81b9
Add endpoint for testing different cache settings in Fastly
2022-05-19 12:59:35 -06:00
Peter Bengtsson
27246f0c2a
300ms maxEventLoopDelay in overload-protection ( #27656 )
2022-05-18 03:00:07 +00:00
Peter Bengtsson
b0d1d5cd20
fix use of DISABLE_OVERLOAD_PROTECTION ( #27711 )
2022-05-16 13:51:38 +00:00
Peter Bengtsson
5630a4139a
process.env.DISABLE_OVERLOAD_PROTECTION ( #27692 )
2022-05-13 15:29:52 -07:00
Peter Bengtsson
677d6a0bc9
unbreak sync-search by making overload protection configurable ( #27680 )
2022-05-13 16:51:37 +00:00
Peter Bengtsson
1108ecda90
remove loader.io middleware ( #27678 )
2022-05-13 08:16:19 -07:00
Peter Bengtsson
8580fb5e42
fast HEAD requests ( #27672 )
...
* fast HEAD requests
* update test
2022-05-13 14:46:57 +00:00
Peter Bengtsson
46303ebba7
more patience in the overload-protection ( #27654 )
2022-05-12 18:17:24 +00:00
Mike Surowiec
b93a3ec387
feat: add overload-protection ( #27612 )
...
* feat: add overload-protection
* Update middleware/overload-protection.js
Co-authored-by: Peter Bengtsson <mail@peterbe.com >
* fix: tests
Co-authored-by: Peter Bengtsson <mail@peterbe.com >
2022-05-12 16:34:25 +00:00
Mike Surowiec
ed8eda1f60
feat: add signal sciences ( #27640 )
...
* tmp: add sigsci
* add sigsci.js
* add sigsci.js
* feat: add sigsci to middleware
* convert sigsci to esmodule
* add sigsci-agent to docker-compose.tmpl
2022-05-12 16:15:17 +00:00
Peter Bengtsson
6605154221
Revert "Fastly Signal Science agent and module ( #27529 )" ( #27624 )
...
This reverts commit aae78966ef .
2022-05-11 14:39:47 -07:00
Peter Bengtsson
aae78966ef
Fastly Signal Science agent and module ( #27529 )
...
* Fastly Signal Science agent and module
* create an assets/build.txt
* try that
* don't experiment with build-args
* do it not just for public builds
* fix comment
* remove experimentation
* actually try using it
* bit louder
* correction
* remove debug logging
2022-05-11 21:18:01 +00:00
Peter Bengtsson
36da8f2c73
expose build SHA ( #27542 )
...
* expose build SHA
* dbg
* dbg
* dbg
* sub
* oops
* oops
* try this
* debugging
* debugging
* debugging
* debugging
* debugging
* without quotes
* typo
* typo
* singular
* mention in Dockerfile
* plural
* does this work
* does this work
* tidying up
* no cache
* Update middleware/index.js
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com >
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com >
2022-05-11 19:14:30 +00:00
Peter Bengtsson
7211419ef1
remove stray console log ( #27440 )
2022-05-03 15:30:03 -04:00
Rachael Sewell
749efd7b99
Rest redirect endpoint ( #27027 )
2022-04-25 16:14:04 +00:00
Grace Park
b98c83e924
REST operations sidebar ( #26225 )
...
* testing out a rest operations sidebar
* cleanup
* renamed 5 files
* renamed 5 files
* set redirect_from on 5 files
* renamed 1 files
* renamed 1 files
* renamed 3 files
* renamed 1 files
* renamed 1 files
* renamed 3 files
* renamed 1 files
* renamed 2 files
* renamed 1 files
* renamed 4 files
* renamed 15 files
* renamed 2 files
* renamed 6 files
* renamed 1 files
* renamed 4 files
* renamed 7 files
* renamed 1 files
* renamed 3 files
* renamed 3 files
* renamed 1 files
* renamed 5 files
* renamed 1 files
* renamed 1 files
* renamed 3 files
* renamed 4 files
* renamed 1 files
* renamed 1 files
* renamed 2 files
* renamed 4 files
* renamed 1 files
* renamed 1 files
* renamed 1 files
* renamed 6 files
* renamed 6 files
* renamed 4 files
* move files
* adding more
* updating to add restcontext and start of removing data/reusables/rest-reference
* removed data/reusables
* add a RestMiniTocItem and updating the filtering to add a subcategory so all manually added H3s are in mini tocs in addition to operations
* remove console log
* [WIP]: REST New Proposal Sidebar (#26471 )
* saving
* update sidebar
* remove console log
* update guides and overview
* import Category for category level rest pages
* update undefined restOperations
* update restOperationData category and subcategory levels"
* minor updates
* update get mini toc items function
* updating REST context for sidebar
* updating rest data
* remove console logs
* WIP: mini-toc-ing the sidebar
Co-authored-by: Robert Sese <rsese@github.com >
* A little cleanup
* Fix first subcategory link and add some comments
* updating anchor links in sidebar
* adding updates
* remove standalone
* update product and maptopic pages using article context
* add conditional link wrapper
* fix sidebar toggle and versions for enterprise admin
* update versions per subcategory
* Highlight sidebar link for current page
* Update miniToc hash links and hash change tracking
* fix unique key in CollapsibleSection
* Fix list markup
* remove title
* update permissions
* Hide minitocs on landing (#26594 )
* hide minitocs on landing page
* simplify page components and remove minitoc from sidebar for guides/overview
* fix carats and category fix
* remove id
Co-authored-by: Grace Park <gracepark@github.com >
* updating content based on versions script check with the OpenAPI
* update script and content files
* update script and content/rest files
* update to add TocLanding
* update script
* update index files
* add codespaces repository-secrets
* remove openapi schema check script
* remove minitocs at the top
* add h2 about the {title} api
* fix tests/unit/openapi-schema.js
* Fix linting tests
* fix search/topics test
* fix tests/unit/pages test
* update rest/reference links in components
* run prettier
* Update components/rest/RestReferencePage.tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update components/rest/RestReferencePage.tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update pages/[versionId]/rest/[category]/[subcategory].tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update pages/[versionId]/rest/[category]/[subcategory].tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update pages/[versionId]/rest/[category]/[subcategory].tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update pages/[versionId]/rest/[category]/[subcategory].tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update tests/unit/openapi-schema.js
Co-authored-by: Rachael Sewell <rachmari@github.com >
* updating comment location
* remove dependabot override
* remove path-utils current product update for rest
* run linter
* remove dependabot.md and remove h2 heading on restreference
* update the correct product to rest for rest pages
* adding comments for updates to path-utils
* remove console log
* REST sidebar: handle legacy v3 redirects (#26686 )
* Add script to handle legacy v3 REST redirects
* Run the script
* Handle a redirect to a redirect
* Update REST test URLs
* 'await' and test runs subcategory of checks
* Update REST URLs for routing/developer-site-redirects tests
* Update developer-redirects fixture with new REST URLs
* Resolve merge conflicts
* Update rest-redirects fixture with new REST URLs
* Fix broken links with REST pages re-org
* redirectTo could be undefined
* Fix script for posterity, can't redirect paths with hashes
* Remove invalid hash redirects
* Typically don't need to save one-off scripts
* Undo redirect changes (not necessary for handling v3 redirects)
* Remove script-added redirects
* Update old v3 redirects with new REST URLs
* No more GHES search indexing page
* 'org' not 'organization'
* Update fixture data for new REST URLs
* revert any content directory changes
Co-authored-by: Grace Park <gracepark@github.com >
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Adding test rest (#26750 )
* add test to check openapi schema versions and content rest frontmatter versions
* update lib/redirects
* fix test and add error messages
* adding repository secrets
* adding repository-secrets.md
* Revert "update lib/redirects"
This reverts commit 3aafe28265764d5bc09c0c478c8e0ca099c8fbcf.
* remove lib/redirects changes and console logs
* Update lib/rest/index.js
Co-authored-by: Rachael Sewell <rachmari@github.com >
* update unique key
* Rest client side redirects (#26754 )
* adding tags subcategory for the rest content repos category
* run prettier
* bug fix for anchor scrolls" (#26892 )
* updating width size for rest reference page
* Rest sidebar consolidation (#26862 )
* refactor sidebar
* fix articlecontext provider issue on rest product landing page for all versions
* fix a bug, create new component
* revert change to create new component and fix bug
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Set currentAnchor with a hashchange handler (#26923 )
* Rest sidebar design tweaks (#26807 )
* Rest sidebar design tweaks
* tweak color to subtle
* use muted color and margin for line
* update to design feedback
Co-authored-by: Grace Park <gracepark@github.com >
* Remove cheerio from rest-collapsible (#26948 )
* remove cheerio from rest-collapsible
* update type
* adding endswith instead
* use productId instead
* one off edge case for secret-scanning
* Reorganize subcategory and category, Update pre -> div, Add RestContext (#26950 )
* reorganize subcategory and category
* add RestContext
* update comment
* update for endpoints page
* add comment
* move object to restcontext
* remove effectiveDate in restcontext
* remove width calculation for rest reference page
* fix adding manual writer's minitocs to sidebar
* update with feedback
* update comment
* update isRestReferencePage
* remove page component and fix bug
* adding back rest/index.tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* update content/rest"
* add back design tweak
* update to div
* update margins on rest api reference
* remove page component
* adding tests
* separate product from rest sidebar (#27065 )
* separate product from rest sidebar
* Use ProductCollapsibleSections for product pages
* fix tests
Co-authored-by: Robert Sese <rsese@github.com >
Co-authored-by: Grace Park <gracepark@github.com >
* Rest sidebar translations (#27052 )
* update translations
* remove general test
Co-authored-by: Robert Sese <rsese@github.com >
Co-authored-by: Rachael Sewell <rachmari@github.com >
2022-04-20 10:19:48 -07:00
Peter Bengtsson
3b1b69002b
measure invalid paths handled ( #26734 )
2022-04-06 16:47:47 +00:00
Peter Bengtsson
a4def10b2c
remove rate limiter and slow-down middleware ( #26709 )
...
* remove rate limiter and slow-down middleware
* update package-lock.json after node-fetch removal in main
2022-04-05 19:38:25 +00:00
Peter Bengtsson
68400c52a8
don't test external early-access in unit tests ( #26612 )
...
* don't test external early-access in unit tests
* make the rendering tests less weird && gg push
2022-04-04 21:00:14 +00:00
Peter Bengtsson
0a0c83db5b
refactor early access breadcrumbs ( #26558 )
...
* refactor early access breadcrumbs
* Update permissions metadata to include users and teams with explicit access
* Inform users of permission requirement for dependabot alerts
* Apply suggestions from code review
* version previews (#26571 )
* update search indexes
* New translation batch for pt (#26591 )
* Add crowdin translations
* Run script/i18n/homogenize-frontmatter.js
* Run script/i18n/fix-translation-errors.js
* Run script/i18n/lint-translation-files.js --check rendering
* run script/i18n/reset-files-with-broken-liquid-tags.js --language=pt
* run script/i18n/reset-known-broken-translation-files.js
* Update subcategories for Codespaces (#25812 )
* Version actions for GHES, use reusables (#26004 )
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com >
Co-authored-by: Sarah Edwards <skedwards88@github.com >
* New translation batch for ja (#26599 )
* Add crowdin translations
* Run script/i18n/homogenize-frontmatter.js
* Run script/i18n/lint-translation-files.js --check rendering
* run script/i18n/reset-files-with-broken-liquid-tags.js --language=ja
* run script/i18n/reset-known-broken-translation-files.js
* Check in ja CSV report
Co-authored-by: Grace Park <gracepark@github.com >
* New translation batch for cn (#26598 )
* Add crowdin translations
* Run script/i18n/homogenize-frontmatter.js
* Run script/i18n/lint-translation-files.js --check rendering
* run script/i18n/reset-files-with-broken-liquid-tags.js --language=cn
* run script/i18n/reset-known-broken-translation-files.js
* Check in cn CSV report
Co-authored-by: Grace Park <gracepark@github.com >
* New translation batch for es (#26597 )
* Add crowdin translations
* Run script/i18n/homogenize-frontmatter.js
* Run script/i18n/fix-translation-errors.js
* Run script/i18n/lint-translation-files.js --check rendering
* run script/i18n/reset-files-with-broken-liquid-tags.js --language=es
* run script/i18n/reset-known-broken-translation-files.js
* Check in es CSV report
Co-authored-by: Grace Park <gracepark@github.com >
* update search indexes
* Rename xxtest-devcontainer.json to devcontainer.json
* Delete .devcontainer/java-environment directory
* Delete .devcontainer/ruby-environment directory
* Update development.md
* Update CONTRIBUTING.md
* Add link to troubleshooting (#26514 )
* update search indexes
* fix old tests
Co-authored-by: Anthony Swierkosz <anthony@swierkosz.dev >
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
Co-authored-by: Sarah Edwards <skedwards88@github.com >
Co-authored-by: GitHub Actions <action@github.com >
Co-authored-by: docubot <67483024+docubot@users.noreply.github.com >
Co-authored-by: Brian McManus <bdmac@github.com >
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com >
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com >
Co-authored-by: Grace Park <gracepark@github.com >
Co-authored-by: hubwriter <hubwriter@github.com >
2022-04-01 10:25:07 -04:00
Peter Bengtsson
bd57e258dc
don't send response headers if response is done ( #26550 )
...
* don't send response headers if response is done
* better
2022-03-30 13:36:12 +00:00
Sarah Schneider
9bb36a17d4
remove Insights-specific logic and update comment ( #26483 )
...
Co-authored-by: Grace Park <gracepark@github.com >
2022-03-29 18:18:34 +00:00
Peter Bengtsson
8362602503
do rendering end-to-end tests with a real server ( #26169 )
...
* reinstate
* start server manually
* routing tests too
* skip more
* sleep more and fail if not 200
* use e2etest for content/ too
* feedbacked
2022-03-18 17:06:12 -04:00
Mike Surowiec
31acea648d
feat: add slow down middleware ( #26207 )
...
* feat: add slow down middleware
Co-authored-by: Peter Bengtsson <mail@peterbe.com >
2022-03-15 13:31:12 -05:00
Peter Bengtsson
73d687a1c5
redirect_from might not exist ( #26158 )
2022-03-14 18:26:51 +00:00
Peter Bengtsson
8a622eb567
& in breadcrumbs instead of & ( #26101 )
2022-03-11 13:48:08 -05:00
Peter Bengtsson
fb52ab256f
breadcrumbs fail on some enterprise-server URIs
2022-03-10 15:23:59 -05:00
Peter Bengtsson
fcda086e13
make enterprise 3.0 redirects work ( #26041 )
...
* make enterprise 3.0 redirects work
* improve tests and better variable name
2022-03-09 16:32:05 +00:00
Peter Bengtsson
95297c3c9d
Simplify getBreadcrumbs ( #26015 )
...
* fix getBreadcrumbs
* don't go too deep
* remove commented out code
2022-03-09 01:14:49 +00:00
Peter Bengtsson
3aa1b1f74c
lazily load graphql static json files ( #25981 )
2022-03-08 18:10:31 +00:00
Peter Bengtsson
9d4b913bdc
language redirects without cache ( #25872 )
...
* redirect to your preferred language (#25664 )
* redirect to your preferred language
* refactorings
* use js-cookies
* make sure no cache when language is involved in the redirect
* fix tests
2022-03-07 16:25:22 +00:00
Peter Bengtsson
881a6d2212
Revert "redirect to your preferred language ( #25664 )" ( #25869 )
...
This reverts commit a9947c086c .
2022-03-04 21:56:57 +00:00
Peter Bengtsson
a9947c086c
redirect to your preferred language ( #25664 )
...
* redirect to your preferred language
* refactorings
* use js-cookies
2022-03-04 16:29:11 +00:00
Peter Bengtsson
bada144c36
lower rate limit in production much higher in dev and test ( #25688 )
...
* lower rate limit in production much higher in dev and test
* custom rate limit for browser tests
* feedbacked
2022-02-28 16:58:48 -05:00