Skip to content

Commit

Permalink
feat: update redirection docs for pr12350 on nest
Browse files Browse the repository at this point in the history
  • Loading branch information
guilopesn committed Sep 5, 2023
1 parent 4c648e3 commit 550473d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions content/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,7 @@ To redirect a response to a specific URL, you can either use a `@Redirect()` dec
@Redirect('https://nestjs.com', 301)
```

Sometimes you may want to determine the HTTP status code or the redirect URL dynamically. Do this by returning an object from the route handler method with the shape:

```json
{
"url": string,
"statusCode": number
}
```
> info **Hint** Sometimes you may want to determine the HTTP status code or the redirect URL dynamically. Do this by returning a `HttpRedirectResponse` imported from `@nestjs/common`.
Returned values will override any arguments passed to the `@Redirect()` decorator. For example:

Expand Down

0 comments on commit 550473d

Please sign in to comment.