Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionServeController.php
| Show First 20 Lines • Show All 985 Lines • ▼ Show 20 Lines | foreach ($objects as $object) { | ||||
| $file = idx($files, $ref->getFilePHID()); | $file = idx($files, $ref->getFilePHID()); | ||||
| if ($file) { | if ($file) { | ||||
| // Git LFS may prompt users for authentication if the action does | // Git LFS may prompt users for authentication if the action does | ||||
| // not provide an "Authorization" header and does not have a query | // not provide an "Authorization" header and does not have a query | ||||
| // parameter named "token". See here for discussion: | // parameter named "token". See here for discussion: | ||||
| // <https://github.com/github/git-lfs/issues/1088> | // <https://github.com/github/git-lfs/issues/1088> | ||||
| $no_authorization = 'Basic '.base64_encode('none'); | $no_authorization = 'Basic '.base64_encode('none'); | ||||
| $get_uri = $file->getCDNURIWithToken(); | $get_uri = $file->getCDNURI(); | ||||
| $actions['download'] = array( | $actions['download'] = array( | ||||
| 'href' => $get_uri, | 'href' => $get_uri, | ||||
| 'header' => array( | 'header' => array( | ||||
| 'Authorization' => $no_authorization, | 'Authorization' => $no_authorization, | ||||
| ), | ), | ||||
| ); | ); | ||||
| } else { | } else { | ||||
| $error = array( | $error = array( | ||||
| ▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines | |||||