Commit d9f1e42f authored by Fabian Reimeier's avatar Fabian Reimeier
Browse files

added access control origin header

parent 5aeca252
......@@ -50,12 +50,12 @@ $app->group('/object', function() use ($app) {
})->setName('object');
$app->get('/{barcode}/manifest.json', function ($request, $response, $args) {
return $response->withRedirect($this->get('router')->pathFor('iiif_manifest', ['barcode' => $args['barcode']]), 303);
return $response->withRedirect($this->get('router')->pathFor('iiif_manifest', ['barcode' => $args['barcode']]), 303)->withHeader("Access-Control-Allow-Origin","*")->withHeader("Access-Control-Allow-Methods","GET");
})->setName('manifest');
});
$app->get('/iiif/{barcode}', function ($request, $response, $args) {
return $response->withRedirect($this->get('router')->pathFor('iiif_manifest', ['barcode' => $args['barcode']]), 303);
return $response->withRedirect($this->get('router')->pathFor('iiif_manifest', ['barcode' => $args['barcode']]), 303)->withHeader("Access-Control-Allow-Origin","*")->withHeader("Access-Control-Allow-Methods","GET");
})->setName('iiif');
$app->group('/data', function() use ($app) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment