| @@ 54-62 (lines=9) @@ | ||
| 51 | $service->addRoute( |
|
| 52 | 'GET', |
|
| 53 | '*', |
|
| 54 | function (Request $request, array $hookData) { |
|
| 55 | $tokenInfo = $hookData['bearer']; |
|
| 56 | ||
| 57 | $response = $this->getObject($request, $tokenInfo); |
|
| 58 | $this->addNoCache($response); |
|
| 59 | $this->addCors($response); |
|
| 60 | ||
| 61 | return $response; |
|
| 62 | } |
|
| 63 | ); |
|
| 64 | ||
| 65 | $service->addRoute( |
|
| @@ 68-76 (lines=9) @@ | ||
| 65 | $service->addRoute( |
|
| 66 | 'HEAD', |
|
| 67 | '*', |
|
| 68 | function (Request $request, array $hookData) { |
|
| 69 | $tokenInfo = $hookData['bearer']; |
|
| 70 | ||
| 71 | $response = $this->getObject($request, $tokenInfo); |
|
| 72 | $this->addNoCache($response); |
|
| 73 | $this->addCors($response); |
|
| 74 | ||
| 75 | return $response; |
|
| 76 | } |
|
| 77 | ); |
|
| 78 | ||
| 79 | // put a document |
|