Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/workloads/application/how-to/redirect.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ The `redirects` field specifies URL redirects. It is structured as a mapping fro
A successful redirect will return a `302 Moved Temporarily` HTTP status code with location header set to the target URL.

!!! info "Explicit redirect permission"
The ingress being redirected has to have `nais.io/allow-redirect: true` set.
This can be set as an annotation in the application spec.
The ingress being redirected has to set the following
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the best way to do it, but I wanted to be more explicit about the docs yaml, since newbies might not be super familiar with the yaml structure? Or maybe they are, and a link to the example full yaml is better? Having a big multiline code block inside this alert/panel is not ideal 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the important part was to get "true" in there.

```yaml
metadata:
annotations:
nais.io/allow-redirect: "true"
```


??? note "Status code for redirects"
Expand Down