apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

Add support to return other code in redirect plugin

Open kj415j45 opened this issue 1 year ago • 1 comments

Feature request

Please describe your feature

Currently, the redirect plugin can only configure ret_code with 301 and 302 through the dashboard. According to MDN - Redirections, there are more HTTP codes indicating the response is a redirect.

Describe the solution you'd like

Since the document of the redirect plugin does not specify the valid value. The dropdown selector should allow the user to manually enter a valid HTTP code.

image

Describe alternatives you've considered

The dashboard should at least allow the user to select the listed redirection codes:

  • 300 (Multiple Choices)
  • 301 (Moved Permanently)
  • 302 (Found)
  • 303 (See Other)
  • 304 (Not Modified)
    • I'm not sure if this should be added as it's a special behavior.
  • 307 (Temporary Redirect)
  • 308 (Permanent Redirect)

Additional context

None

kj415j45 avatar Dec 15 '23 04:12 kj415j45