Skip to content

Commit

Permalink
Merge pull request #86 from creative-commoners/pulls/2/stop-using-depr
Browse files Browse the repository at this point in the history
API Stop using deprecated API
  • Loading branch information
sabina-talipova authored Dec 5, 2022
2 parents 9381f33 + 1b66be2 commit bef19ec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Controllers/CMSExternalLinksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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')
Expand Down

0 comments on commit bef19ec

Please sign in to comment.