Skip to content

Instantly share code, notes, and snippets.

@nedSaf
Created November 26, 2015 12:47
Show Gist options
  • Save nedSaf/43d8335c8a8b592f0c37 to your computer and use it in GitHub Desktop.
Save nedSaf/43d8335c8a8b592f0c37 to your computer and use it in GitHub Desktop.
Allow different origins in restful/
<?php
if (!drupal_is_cli()) {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Headers: Authorization, access-token, access_token');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment