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

errorPage method should return a 410 Gone #157

Open
JamesDPC opened this issue Jan 24, 2022 · 0 comments
Open

errorPage method should return a 410 Gone #157

JamesDPC opened this issue Jan 24, 2022 · 0 comments

Comments

@JamesDPC
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants