1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Commit Graph

175 Commits

Author SHA1 Message Date
Peter Bengtsson
d014f36222 fix external redirects (#28063)
* fix external redirects

* oops

* feedbacked
2022-06-02 02:06:29 +00:00
Peter Bengtsson
7e614adc12 wrap async middlewares correctly (#28030)
* wrap async middlewares correctly

* clean up more

* feedbacked
2022-06-01 15:13:23 +00:00
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
0340760554 remove spotContentFlaws middleware (#28068) 2022-05-31 18:19:16 +00:00
Peter Bengtsson
75c0ec5cab /en/ permanent redirects to /en should be CDN cacheable (#27976) 2022-05-25 13:51:16 +00:00
Mike Surowiec
fac6d5a85c feat: remove sigsci (#27932) 2022-05-24 09:49:19 -05:00
Peter Bengtsson
bfd9ae0aed fast root redirect (#27925) 2022-05-23 21:36:58 +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
6f5255cb92 Add comments explaining the purpose of the fastly-cache-test middleware. 2022-05-19 14:50:56 -06:00
brannon
671b9a81b9 Add endpoint for testing different cache settings in Fastly 2022-05-19 12:59:35 -06: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
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
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
Rachael Sewell
749efd7b99 Rest redirect endpoint (#27027) 2022-04-25 16:14:04 +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
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
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
Rachael Sewell
2ade7d8489 reactify rest pages (#25005) 2022-02-28 18:30:54 +00:00
Peter Bengtsson
d0524e5124 make sure req.ip becomes correct (#25628)
* make sure req.ip becomes correct

* feedbacked
2022-02-24 17:54:09 +00:00
Peter Bengtsson
17b44323f9 it's fastly-client-ip not Fastly-Client-IP (#25623) 2022-02-24 12:03:32 -05:00
Peter Bengtsson
177e197d8d soft rate limit all requests (#25556)
* rate limit all requests

* set IP in tags to statsd

* expose _ip route for assuring we get the right IP

* remove old unit test

* nit
2022-02-23 16:46:29 +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
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
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
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
Mike Surowiec
26829bbae2 Update logging format for azure (#24830)
* update logging format for azure
2022-01-31 16:54:39 +00:00
Peter Bengtsson
acf3699ff3 wrap 'rest' middleware in asyncMiddleware (#24636) 2022-01-25 23:10:18 +00: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
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
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
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
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
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
Kevin Heis
86b6b1ad6f Remove storybook (#21037)
* Remove storybook

* Update index.js
2021-08-23 12:07:54 -07:00
Kevin Heis
8d7bb82e47 Add basic auth to storybook (#20955)
* Add basic auth to storybook

* Update index.js

* Update index.js
2021-08-18 14:03:35 -07:00
Kevin Heis
ae7b652463 Create a storybook with callout component (#20902)
* Create a storybook with callout component

* Add to dist/storybook

* Remove references to dist dir, storybook takes place

* Update Callout.stories.tsx

* Update Dockerfile

* Update Dockerfile
2021-08-17 20:28:59 +00:00