Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info box about redirect permissions #703

Merged
merged 1 commit into from
Nov 22, 2024
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
9 changes: 7 additions & 2 deletions docs/workloads/application/how-to/redirect.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ 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.


??? note "Status code for redirects"
The status code can not be overridden.
The status code can not be overridden.

### Structure

Expand Down Expand Up @@ -52,4 +57,4 @@ spec:

In this example:

- Requests to `http://example-old.nais.io` are redirected to `http://example-new.nais.io`.
- Requests to `http://example-old.nais.io` are redirected to `http://example-new.nais.io`.