Description
Search for duplicate feature request
- I already searched, and this feature request or improvement is not a duplicate.
Feature scope
Completely new feature
Feature request related to a problem
I would like to specify that 410 Gone
should be returned in response to certain request paths.
Describe the solution you'd like
This could be done with a config option specifically for the 410 status code:
410_gone = [ "/removed/*/path" ]
Alternatively, it could be provided in the form of a more general ability to use status codes other than 200 for certain resources, possibly in conjunction with URL-rewrites to return the desired error-message content.
This would take the form of a series of rules (like the rewrite
and redirect
rules) that map request paths to status codes:
[[advanced.custom-status]]
request = "/removed/*/path"
status = 410
Describe alternatives you've considered
It appears that maintenance mode can be (ab)used to emulate this behavior, at least in the case where all resource requests should receive 410 Gone
. Users who need only some resources to be marked "gone" could set up one server in permanent "maintenance mode" and another configured normally, and use a proxy server to route requests to the appropriate server instance.
Build target
All targets
Additional context
No response