Skip to content

HTTP Redirects (documentation issue) #8561

@WarpRat

Description

@WarpRat

There's a minor issue with the HTTP redirect documentation. This page has the following warning:

Note: 301 (default) and 302 are the only supported statusCodes.

However looking at the CRDs, it appears that there are more options supported now. At least as of 1.7.0:

> k explain httproute.spec.rules.filters.requestRedirect.statusCode
GROUP:      gateway.networking.k8s.io
KIND:       HTTPRoute
VERSION:    v1

FIELD: statusCode <integer>
ENUM:
    301
    302
    303
    307
    308

DESCRIPTION:
    StatusCode is the HTTP status code to be used in response.

    Note that values may be added to this enum, implementations
    must ensure that unknown values will not cause a crash.

    Unknown values here must result in the implementation setting the
    Accepted Condition for the Route to `status: False`, with a
    Reason of `UnsupportedValue`.

    Support: Core

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions