Skip to content

Conversation

wezz
Copy link

@wezz wezz commented Dec 17, 2024

In Optimizely, expired pages respond with a 410 http response which is ignored by the NotFound Handler.

This PR adds a option to enable the redirect manager to work on 410 responses.

@wezz
Copy link
Author

wezz commented Dec 18, 2024

@jevgenijsp @kaspars-ozols @marisks
Could any of you have a look at this PR?

}

if (context.Response.StatusCode != 404)
if (context.Response.StatusCode != 404 && (_configuration.Handle410 && context.Response.StatusCode != 410))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this check should be written in different way. One option would be to have list with status codes that context.Response.StatusCode could be checked against. Message should contain those status codes that application is configured to handle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants