Skip to content

Support "410 Gone" response, or fully custom status codes #510

Open
@BatmanAoD

Description

@BatmanAoD

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededv2v2 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy