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 410 support, make status codes filterable #215

Merged
merged 4 commits into from
Nov 23, 2020
Merged

Add 410 support, make status codes filterable #215

merged 4 commits into from
Nov 23, 2020

Conversation

dinhtungdu
Copy link
Collaborator

@dinhtungdu dinhtungdu commented Jul 20, 2020

Description of the Change

This PR adds:

  • 410 Gone status code to the list of HTTP status codes.
  • A new filter: srm_additional_status_codes that allows developer add status codes.

Verification Process

  1. Create or edit a redirect rule.
  2. See 410 Gone option in the HTTP code select.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Fixes #205.

Changelog Entry

@jeffpaul jeffpaul added the type:enhancement New feature or request. label Jul 20, 2020
@jeffpaul jeffpaul added this to the 2.0.0 milestone Jul 20, 2020
@dinhtungdu dinhtungdu marked this pull request as ready for review November 17, 2020 15:45
array()
);

return $status_codes + array_diff_key( $additional_status_codes, $status_codes );
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 is okay but I just want to double check that PHP 8 won't get mad about + as an array operator.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tested + against php-8.0.0rc4 and I don't see any problem. The site I used to test is: https://3v4l.org/

@jeffpaul jeffpaul mentioned this pull request Nov 17, 2020
18 tasks
@jeffpaul jeffpaul merged commit 56493cd into develop Nov 23, 2020
@jeffpaul jeffpaul deleted the fix/205 branch January 7, 2021 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add 410 Gone Support
3 participants