diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-08-28 23:09:07 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-08-28 23:09:07 +0200 |
commit | 9e2975c629265befdd425346ed4080d200343ce4 (patch) | |
tree | 6f7ce5e65c4fd761ca365dc765a2b8ab930c900a /appinfo | |
parent | 2f67340e551b12dce8824381c3291bb2137857cb (diff) |
add cors for API
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/routes.php | 8 |
1 files changed, 8 insertions, 0 deletions
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()); |