JavaScript Rails 4.2 and cross-domain cookies to allow reading of cookie data rails cross domain cookies,rails cross domain,rails allow cross

I have a Rails 4.2 app that is getting requests from another domain. I'd like them to send a uuid that we set in our javascript. It works on localhost but not cross-domain. In our application_controller.rb I have:

class ApplicationController < ActionController::Base

 after_filter :cors_set_access_control_headers

  def cors_set_access_control_headers
    headers['Access-Control-Allow-Origin'] = '*'
    headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS'
    headers['Access-Control-Request-Method'] = '*'
    headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
  end

but I am not able to get a value like:

cookies[:uuid]

Is there another step I need to do?

Answer:1

I am retrieving a document from PouchDB in an Angular Service. The document is retrieved in the following format: { "_id":"segments", "_rev":"1-4f0ed65cde23fe724db13bea1ae3bb13", "segments":[ { "...

I am retrieving a document from PouchDB in an Angular Service. The document is retrieved in the following format: { "_id":"segments", "_rev":"1-4f0ed65cde23fe724db13bea1ae3bb13", "segments":[ { "...

  1. rxjs json array
  2. rxjs map json array

I'm having trouble figuring this out. I've created a table, and I want to use clickable buttons (not the arrow keys) to navigate through each cell and mark that cell as yellow. The table builds and I ...

I'm having trouble figuring this out. I've created a table, and I want to use clickable buttons (not the arrow keys) to navigate through each cell and mark that cell as yellow. The table builds and I ...

  1. javascript using buttons
  2. javascript using radio buttons
  3. javascript calculator using radio buttons
  4. calculator program in javascript using buttons

Currently I've got the following JSON feed: var data = { "feeds": { "regions": [{ "name": "Lichtenberg", "id": "01408.b", "suburbs": [{ "name": "Fennpfuhl", ...

Currently I've got the following JSON feed: var data = { "feeds": { "regions": [{ "name": "Lichtenberg", "id": "01408.b", "suburbs": [{ "name": "Fennpfuhl", ...

  1. creating array with for loop python
  2. creating array with values java
  3. creating array with numpy
  4. creating array with malloc
  5. creating array with new c++
  6. creating array with new
  7. creating array with negative size
  8. creating array with python
  9. creating array with
  10. creating array with integers java
  11. creating array with string
  12. creating array with mdadm
  13. creating array in java
  14. creating array in javascript
  15. creating array in php
  16. creating array in c
  17. creating array in matlab
  18. creating array in r
  19. creating array in js
  20. creating array in typescript

I need a textarea to include a set of double quotes at the start and end of the textarea value. The below code works in that double quotes are added to the start and end of the field, but if the user ...

I need a textarea to include a set of double quotes at the start and end of the textarea value. The below code works in that double quotes are added to the start and end of the field, but if the user ...