---
title: Enable HTTP 302 Redirects
description: Controls how the agent handles redirects, as follows:
component: java-agents
version: 2025.11
page_id: java-agents:properties-reference:org.forgerock.agents.302.redirects.enabled
canonical_url: https://docs.pingidentity.com/java-agents/2025.11/properties-reference/org.forgerock.agents.302.redirects.enabled.html
---

# Enable HTTP 302 Redirects

Controls how the agent handles redirects, as follows:

* `true`: HTTP 302 Redirects are enabled. When an unauthenticated request is made, and not-enforced rules do not apply, the agent returns an HTTP 302 code to redirect the user to an authentication endpoint.

* `false`: HTTP 302 Redirects are disabled. When an unauthenticated request is made, the agent returns a block of configurable JSON that can be intercepted.

The returned HTTP code, content type, and data is configured by the following properties

* [HTTP 302 Redirect Replacement HTTP Status Code](org.forgerock.agents.302.redirect.http.status.code.html)

* [HTTP 302 Redirect Content Type](org.forgerock.agents.302.redirect.http.content.type.html)

* [HTTP 302 Redirect Data](org.forgerock.agents.302.redirect.http.data.html)

Lists of URLs in a `not-enforced` rule style, for which the data is produced are configured by the following properties

* [HTTP 302 Redirect Not-Enforced List](org.forgerock.agents.config.json.url.html)

* [HTTP 302 Redirect Invert Not-Enforced List](org.forgerock.agents.config.json.url.invert.html)

Use this option when it is difficult to handle 302, for example, when the agent is accessed by a JavaScript application, or by something other than a browser.

|                          |                                                                                                                                                        |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Property name            | `org.forgerock.agents.302.redirects.enabled`                                                                                                           |
| Aliases                  | `org.forgerock.agents.302.redirects.enabled`   Introduced in Java Agent 5.8.0   [Recognized](preface.html#how_am_manages_multiple_aliases) from AM 7.1 |
| Function                 | Global                                                                                                                                                 |
| Type                     | Boolean: `true` returns true; all other strings return `false`.                                                                                        |
| Default                  | `true`                                                                                                                                                 |
| Bootstrap property       | No                                                                                                                                                     |
| Required property        | No                                                                                                                                                     |
| Restart required         | No                                                                                                                                                     |
| Local configuration file | `AgentConfig.properties`                                                                                                                               |
| AM console               | Tab: `Miscellaneous (from AM 7.1)`Title: `Enable HTTP 302 Redirects`Legacy title: `HTTP 302 Redirects Enabled`                                         |
