mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Enable etag in URI by default
This commit is contained in:
@@ -146,14 +146,15 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea
|
||||
{
|
||||
$registry = registry::get_instance();
|
||||
|
||||
return sprintf('%spermalink/v1/%d/%d/%s/%s.%s?token=%s',
|
||||
return sprintf('%spermalink/v1/%d/%d/%s/%s.%s?token=%s&etag=%s',
|
||||
$registry->get('GV_ServerName'),
|
||||
$this->media_subdef->get_sbas_id(),
|
||||
$this->media_subdef->get_record_id(),
|
||||
$this->media_subdef->get_name(),
|
||||
$this->get_label(),
|
||||
pathinfo($this->media_subdef->get_file(), PATHINFO_EXTENSION),
|
||||
$this->get_token()
|
||||
$this->get_token(),
|
||||
$this->media_subdef->getEtag()
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -229,7 +229,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
|
||||
, 'height' => $this->height
|
||||
, 'etag' => $this->etag
|
||||
, 'path' => $this->path
|
||||
, 'url' => $this->url
|
||||
, 'url' => $this->url . ($this->is_physically_present ? '?etag=' . $this->etag : '')
|
||||
, 'file' => $this->file
|
||||
, 'physically_present' => $this->is_physically_present
|
||||
, 'is_substituted' => $this->is_substituted
|
||||
|
Reference in New Issue
Block a user