From 9e2975c629265befdd425346ed4080d200343ce4 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 28 Aug 2013 23:09:07 +0200 Subject: add cors for API --- appinfo/routes.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'appinfo') diff --git a/appinfo/routes.php b/appinfo/routes.php index a61eb33b0..c50f13fc1 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -275,6 +275,14 @@ $this->create('news_api_folders_read', '/api/v1-2/folders/{folderId}/read')->put /** * Feed API */ + +$this->create('news_api_cors', '/api/v1-2/{path}')->method('options')->action( + function($params) { + return App::main('NewsAPI', 'cors', $params, new DIContainer()); + } +)->requirements(array('path', '.+')); + + $this->create('news_api_feeds_get_all', '/api/v1-2/feeds')->get()->action( function($params) { return App::main('FeedAPI', 'getAll', $params, new DIContainer()); -- cgit v1.2.3