mirror of
https://github.com/silverstripe/silverstripe-externallinks.git
synced 2024-10-22 17:05:44 +02:00
Merge pull request #86 from creative-commoners/pulls/2/stop-using-depr
API Stop using deprecated API
This commit is contained in:
commit
bef19ec35c
@ -2,13 +2,12 @@
|
||||
|
||||
namespace SilverStripe\ExternalLinks\Controllers;
|
||||
|
||||
use SilverStripe\Control\HTTP;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\ExternalLinks\Model\BrokenExternalPageTrackStatus;
|
||||
use SilverStripe\ExternalLinks\Jobs\CheckExternalLinksJob;
|
||||
use SilverStripe\ExternalLinks\Tasks\CheckExternalLinksTask;
|
||||
use SilverStripe\Control\Controller;
|
||||
use Symbiote\QueuedJobs\Services\QueuedJobService;
|
||||
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
|
||||
|
||||
class CMSExternalLinksController extends Controller
|
||||
{
|
||||
@ -26,8 +25,7 @@ class CMSExternalLinksController extends Controller
|
||||
public function getJobStatus()
|
||||
{
|
||||
// Set headers
|
||||
HTTP::set_cache_age(0);
|
||||
HTTP::add_cache_headers($this->response);
|
||||
HTTPCacheControlMiddleware::singleton()->setMaxAge(0);
|
||||
$this->response
|
||||
->addHeader('Content-Type', 'application/json')
|
||||
->addHeader('Content-Encoding', 'UTF-8')
|
||||
|
Loading…
Reference in New Issue
Block a user