mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
docs: add sendRedirect
usage (#19070)
This commit is contained in:
parent
7aa35ff958
commit
c8b49a3253
@ -255,6 +255,14 @@ export default defineEventHandler((event) => {
|
||||
})
|
||||
```
|
||||
|
||||
### Sending Redirect
|
||||
|
||||
```ts [server/api/foo.get.ts]
|
||||
export default defineEventHandler((event) => {
|
||||
return sendRedirect(event, '/path/redirect/to', 302)
|
||||
})
|
||||
```
|
||||
|
||||
### Return a Legacy Handler or Middleware
|
||||
|
||||
```ts [server/api/legacy.ts]
|
||||
|
Loading…
Reference in New Issue
Block a user