Skip to content

errorPage method should return a 410 Gone #157

@JamesDPC

Description

@JamesDPC

Hi folks

The errorPage method currently returns a '200 OK' when called and renders a Silverstripe logo with an ipad by default:

    /**
     * @return DBHTMLText
     */
    protected function errorPage()
    {
        Requirements::css('silverstripe/sharedraftcontent: client/dist/styles/bundle-frontend.css');
        return $this->renderWith('ShareDraftContentError');
    }

When a token expires or is not found, the URL should return a 410 HTTP response and let the application handle how it renders that status code (eg. default web server error page).

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410

The 410 status code would instruct HTTP clients to not request that URL again.

Cheers
James

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions