Commit graph

9 commits

Author SHA1 Message Date
JJ Kasper
8e161e1855
Middleware docs update (#38111)
* Initial outline added for middleware docs

* Feedback changes - not included new user agent yet

* edge api routes docs

* middleware page some cleanup

* moved api stuff to next server, added useragent

* waitUntil example added

* Updated env vars section

* Added cookies on the request object example

* fixed naming

* fixed import typo

* Amy feedback

* Update docs/advanced-features/middleware.md

Co-authored-by: Amy Burns <amy.burns@vercel.com>

* first commit

* more fixes

* re-structuring based on feedback

* changes to middleware.md

* updates to edge-api-routes

* code typo

* Update docs/advanced-features/middleware.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Update edge-api-routes.md

* Update Edge Runtime API docs

* Clarify API docs

* Update

* Update docs/advanced-features/middleware.md

* Update switchable runtime docs

* Update response

* experimental-edge

* Update docs/advanced-features/middleware.md

* Add example of forwarding headers and address comments

* Add proxying headers to middleware upgrade guide

* Apply suggestions from code review

Co-authored-by: Jeff Escalante <jescalan@users.noreply.github.com>

* fix middleware directory spec

* localization explanation

* update detecting runtime

* Update docs/advanced-features/react-18/switchable-runtime.md

Co-authored-by: Balázs Orbán <info@balazsorban.com>

* fix prettier issues

* table fix

* Update docs/advanced-features/react-18/switchable-runtime.md

Co-authored-by: Jeff Escalante <jescalan@users.noreply.github.com>

* Update docs/api-routes/edge-api-routes.md

Co-authored-by: Jeff Escalante <jescalan@users.noreply.github.com>

* lint-fix

Co-authored-by: molebox <hello@richardhaines.dev>
Co-authored-by: Amy Burns <amy.burns@vercel.com>
Co-authored-by: Ismael Rumzan <ismael.rumzan@gmail.com>
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: Jeff Escalante <jescalan@users.noreply.github.com>
Co-authored-by: Ismael <ismael@vercel.com>
2022-06-28 10:22:48 -05:00
Dom Sip
a90349d519
Update middleware-upgrade-guide to be consistent (#38102)
Update middleware-upgrade-guide.md

Ensure that before and after examples are consistent
2022-06-28 14:48:57 +02:00
Javi Velasco
0f33c0cbf5
Rephrase middleware location (#38073)
It is possible that users that are defining `src/pages` in their project confuse the "project root" to locate middleware with the actual project root instead of `src/middleware` so this PR rephrases the migration guide to make explicit that the it should be located **next** to the `pages` folder.
2022-06-27 17:13:19 +00:00
Steven Tey
8019cf002a
Added ESLint upgrade instructions to middleware upgrade guide (#38008)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-27 00:20:36 +00:00
M. Zakiyuddin Munziri
2833904b6f
Fix typo for rewrites/redirects to rewrite/redirect (#38016)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-26 16:17:34 -05:00
Lee Robinson
5646e43f83
Fix typo for rewrites to rewrite. (#38000) 2022-06-24 15:45:02 -05:00
Balázs Orbán
a590c4e7f3
docs: return response in code example (#37985)
* Update middleware-upgrade-guide.md

* lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-24 11:13:40 -05:00
JJ Kasper
97395b4cd6
Add missing error manifest entry and fix lint (#37758)
* Add missing error manifest entry

* fix lint

* guid -> guide
2022-06-16 11:46:15 -05:00
Lee Robinson
eb55af1cfe
Add upgrade guide for Middleware. (#37382)
* Middleware upgrade guide

* Add a bit more

* Apply suggestions from code review

Co-authored-by: Rich Haines <hello@richardhaines.dev>
Co-authored-by: Edward Thomson <ethomson@github.com>
Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>

* Apply suggestions from code review

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Updates based on PR comments

* Add before / after

* Flip paragraphs

* Apply suggestions from code review

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Apply suggestions from code review

Co-authored-by: Kiko Beats <josefrancisco.verdu@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Damien Simonin Feugas <damien.feugas@gmail.com>

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Dom Sip <dominik.sipowicz@gmail.com>

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Damien Simonin Feugas <damien.feugas@gmail.com>

* Update middleware-upgrade-guide.md

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Apply suggestions from code review

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Apply suggestions from code review

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>
Co-authored-by: Edward Thomson <ethomson@github.com>
Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
Co-authored-by: Kiko Beats <josefrancisco.verdu@gmail.com>
Co-authored-by: Damien Simonin Feugas <damien.feugas@gmail.com>
Co-authored-by: Dom Sip <dominik.sipowicz@gmail.com>
2022-06-16 09:29:18 -07:00