Quinn-Interactive / silverstripe-seo

An all-in-one SEO module for SilverStripe 4.1+
BSD 3-Clause "New" or "Revised" License
33 stars 20 forks source link

FIX: Authentication issue with stage workaround #32

Closed zanderwar closed 2 years ago

zanderwar commented 6 years ago

When fetching from ?stage=Stage which, would obviously be ideal as anyone would like to know how it scores before it's published... we're presented with an authentication issue that is only logged in users are able to see ?stage=Stage whereas file_get_contents() doesn't allow that.

Moving forward, maybe we could tokenize an authenticated request using HTTPMiddleware and pass it along with the file_get_contents call.

Currently, with this; the "new page" bug is fixed; but will still display "Login" in the preview until the page is published.