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?
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":[ { "...
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 ...
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", ...
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 ...