Kevin Heis
d21bbbcc55
Skip upgradeInsecureRequests on localhost ( #29668 )
2022-08-08 15:19:46 +00:00
Peter Bengtsson
a1e3866fa5
don't get available languages from session ( #29715 )
...
* don't get available languages from session
* update useSession
* one more fix
2022-08-08 11:13:27 -04:00
Kevin Heis
928b01d1e3
Cache in fastly much longer than browser ( #29682 )
...
* Cache in fastly much longer than browser
* Update render-page.js
* Update cache-control.js
2022-08-05 22:59:14 +00:00
Peter Bengtsson
f8f20605f4
search api with elasticsearch ( #29053 )
...
* indexing records into Elasticsearch
* @elastic/elasticsearch@8.2.0
* mv
* fix the code
* pipe
* lfs
* use sha
* change how index names work
* search api with Elasticsearch
* works
* refactor client
* better snowballing
* remove dbg
* wip
* highlights and fuzzy search
* improvements and upgrade
* also upgrade
* wip
* index more explicitly
* better validation
* change max size
* popularity by ordinal ranking instead
* playing
* fix package-lock
* rearranging
* catchMiddlewareError
* fix indexing
* match_phrase_prefix on wrapped search
* refactorings
* escape html in content
* wip
* search by URL
* update lock file
* v1 api
* inroads on jest testing the search
* valid yaml hopefully
* index fixtures into local elasticsearch
* specific versions to index only
* small fixes
* feedbacked
* fix tests
* use the npm script
2022-08-05 19:40:38 +00:00
Peter Bengtsson
67c1ff3441
Remove overload protection ( #29659 )
2022-08-05 15:04:33 +00:00
Kevin Heis
56aa9ea094
Move use session to its own hook file ( #29641 )
...
* Move use session to its own hook file
* Trying useSWR
* Try one hour html cache
* blah blah lint
* Update to include loading state
* Update components/hooks/useSession.ts
Co-authored-by: Peter Bengtsson <peterbe@github.com >
Co-authored-by: Peter Bengtsson <peterbe@github.com >
2022-08-05 14:47:10 +00:00
Kevin Heis
bb1f30a39b
Update HTML cache control to 10 minutes ( #29586 )
...
* Update HTML cache control to 10 minutes
* A little clean up
* Remove quick-lru
2022-08-03 20:39:54 +00:00
Rachael Sewell
467459af7c
Reactify graphql pages ( #28547 )
2022-08-03 10:51:21 -07:00
Kevin Heis
bee3b5c9f3
Enable up to one minute of HTML caching ( #29572 )
...
* Enable up to one minute of HTML caching
* Skip a test that isn't the level of cache control we now want
2022-08-03 16:26:53 +00:00
Kevin Heis
f8d2395960
Remove theme from HTML ( #29560 )
...
* Remove theme from HTML
* update for linting error
* Fix for overriding default color modes
Co-authored-by: Grace Park <lugraciecy@gmail.com >
Co-authored-by: Grace Park <gracepark@github.com >
2022-08-02 17:06:54 -07:00
Kevin Heis
11267f2404
Explicitly no cache on /api/events ( #29549 )
2022-08-02 18:22:17 +00:00
Kevin Heis
a16aeac936
Prepare render-page for re-enabling HTML caching ( #29473 )
...
* Prepare render-page for re-enabling HTML caching
* Prepare render-page for re-enabling HTML caching
* Prepare render-page for re-enabling HTML caching
* Update healthz.js
* Pre calculate cache control directives
* Update render-page.js
2022-07-29 19:49:36 +00:00
Kevin Heis
0886faddac
Move language context to browser/session ( #29433 )
2022-07-28 18:50:46 +00:00
Kevin Heis
f79e1d2cb7
Fetch CSRF token over XHR (browser-side) ( #29337 )
...
* Client side csrf token grab
* Update get-session.ts
* Update get-session.ts
* Update get-session.ts
* Remove test refs to meta tag
* Update get-session.ts
* Update get-session.ts
* Update get-session.ts
* Update get-session.ts
* Fix some type issues
* Simplify api
* Update components/lib/get-session.ts
Co-authored-by: Rachael Sewell <rachmari@github.com >
Co-authored-by: Rachael Sewell <rachmari@github.com >
2022-07-27 16:18:07 +00:00
Kevin Heis
bb3cb78dd1
Move events under api ( #29298 )
2022-07-26 18:00:58 +00:00
Kevin Heis
2182ff28f3
Next12 now supports ESM ( #29295 )
...
* Next12 now supports ESM
* No more michael jackson script extensions
* Fix test running
* Update jest-puppeteer.config.cjs
* Update package.json
2022-07-26 17:53:23 +00:00
Kevin Heis
564e3a5e2a
Move CSRF response back to XHR (Node.js prep) ( #29179 )
...
* Move CSRF response back to XHR
* Update events.js
* Pass through cookieJar
* Enable session route test
* Skip next x csrf test
* Add other fields to endpoint for future issues
* Remove client side parts
* Revert test skip
* Use nested router pattern
* ugh forgot a file
* Update naming
* Update tests/rendering/session.js
Co-authored-by: Peter Bengtsson <peterbe@github.com >
* Updating to use cache control
* Use req.langauge and req.userLanguage
Co-authored-by: Peter Bengtsson <peterbe@github.com >
2022-07-22 18:17:22 +00:00
Peter Bengtsson
cc197ccbf1
make it possible to control the rendering cache LRU sizes ( #29180 )
...
* make it possible to control the rendering cache LRU sizes
* Update middleware/cache-full-rendering.js
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com >
* Update middleware/cache-full-rendering.js
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com >
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com >
2022-07-20 20:45:06 +00:00
Peter Bengtsson
9dce4cd96d
redirect to language url for ghes 3.0 and 3.1 ( #29136 )
...
Co-authored-by: Hector Alfaro <hectorsector@github.com >
2022-07-19 15:22:48 +00:00
Peter Bengtsson
4bff926c7e
inject language for legact admin/release-notes URLs ( #29082 )
2022-07-15 20:28:31 +00:00
Peter Bengtsson
e0a20add31
//en/some/path should redirect to /en/some/path ( #29077 )
...
* //en/some/path should redirect to /en/some/path
* remove debugging
2022-07-15 19:16:42 +00:00
Peter Bengtsson
642c971049
morgan logging off by default in tests ( #28987 )
2022-07-12 20:53:34 +00:00
Peter Bengtsson
2ebfb60b4b
refactor how archived frontmatter fallbacks work ( #28170 )
...
* refactor how archived frontmatter fallbacks work
* delete no-longer used file
* avoid the mention
* Update lib/redirects/README.md
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com >
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com >
2022-07-12 20:23:05 +00:00
Matt Pollard
aa5130d3f5
Merge branch 'main' into imjohnbo-content-plan-6764
2022-07-02 12:34:14 +02:00
Peter Bengtsson
c1f0030e3a
NextJS 12.1.6 ( #26102 )
...
* nextjs 12.1.0
* no idea what's going on
* desperate attempts
* wip
* lots of data is necessary for 'npm run build' now
* tidying up
* update package lock
2022-06-28 12:57:38 +00:00
Kevin Heis
f948c81038
Upgrade got ( #28617 )
...
* Upgrade got
* Update e2etest.js
* Skip following redirects on redirect tests
* Update deprecated-enterprise-versions.js
2022-06-21 16:23:51 +00:00
Peter Bengtsson
a39614fdcf
remove supertest dependency ( #28572 )
...
* remove supertest dependency
* remove bad test
2022-06-16 15:56:41 +00:00
Peter Bengtsson
d4692b208e
put the full plan name in the page titles ( #28450 )
...
* put the full plan name in the page titles
* fix tests
2022-06-16 13:29:23 +00:00
Peter Bengtsson
071c95a91c
make miniToc pure data and no html strings ( #28517 )
...
* make miniToc pure data and no html strings
* fixups
* some types refactoring
2022-06-15 18:31:36 +00:00
Laura Coursen
799f2a5dec
Merge branch 'main' into imjohnbo-content-plan-6764
2022-06-15 08:14:39 +01:00
Kevin Heis
71fedb1f31
Update to helmet 5 ( #28488 )
...
* Update to helmet 5
* Disable cross-origin-embedder-policy
* Update helmet.js
* Update helmet.js
* Add CORS on get / options
* Update helmet.js
* Update helmet.js
* Update helmet.js
* Update helmet.js
* Revert "Update helmet.js"
This reverts commit 61ad2fb641ca16a31bf148164c395f2ba91e1734.
* Open up github domains
* Include self
* Update helmet.js
* Update helmet.js
2022-06-14 21:43:25 +00:00
Sarah Schneider
157c82b09c
error message tweaks for clarity
2022-06-13 16:10:40 -04:00
Peter Bengtsson
c45c378ad7
memoize reading lib/graphql/static/schema*.json files ( #28443 )
2022-06-13 18:21:22 +00:00
brannon
000a34a1a7
Add explicit config value to enable Fastly testing.
2022-06-03 09:52:02 -06:00
brannon
e7ec9ad487
Merge branch 'main' into brannon-serve-stale-content
2022-06-02 17:33:13 -06:00
brannon
d575b8edd6
Update Fastly test middleware to run in staging ONLY.
...
Add ability to set more headers to mimic real content responses.
Add ability to inject errors, to help in validating behavior.
2022-06-02 17:19:53 -06:00
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
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