Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Commit b22583ee authored by ekes's avatar ekes
Browse files

Add CORS headers for API. Fixes #201.

Just allowing GET requests for now.
parent e838c830
......@@ -279,6 +279,9 @@ projects[services_entity][version] = "2.0-alpha8"
projects[services_search_api][subdir] = "contrib"
projects[services_search_api][version] = "2.0-alpha1"
projects[cors][subdir] = "contrib"
projects[cors][version] = "1.3"
;
;; Metadata
;
......
......@@ -2,8 +2,9 @@ name = Radar services
description = API configuration
core = 7.x
package = Radar
version = 7.x-1.1-beta1
version = 7.x-1.2
project = radar_services
dependencies[] = cors
dependencies[] = ctools
dependencies[] = features
dependencies[] = rest_server
......@@ -17,6 +18,7 @@ features[services_endpoint][] = api_1_0
features[services_endpoint][] = api_1_1
features[services_endpoint][] = api_1_2
features[user_permission][] = services_search_api search from any index
features[variable][] = cors_domains
features[variable][] = services_entity_resource_class
features[variable][] = uuid_services_support_all_entity_types
files[] = plugins/services_entity/resource_controller.inc
......@@ -10,6 +10,15 @@
function radar_services_strongarm() {
$export = array();
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cors_domains';
$strongarm->value = array(
'api/*' => '<mirror>|GET',
);
$export['cors_domains'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
......
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