Fork me on GitHub

By enabling the CORS module in Drupal, it's possible to for example develop your app on localhost, while the Drupal site is located remotely

  1. Download and enable CORS
  2. Go to admin/config/services/cors
  3. Enter this:
  1. Open your .htacces file and add this to the end of the file:
Header set Access-Control-Allow-Headers "origin, content-type, accept, x-csrf-token"

At first glance, this doesn't work for User Login though.