Skip to content

Instantly share code, notes, and snippets.

@donrestarone
Created March 4, 2020 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donrestarone/2660c91002d4d09af8221a83210b3d93 to your computer and use it in GitHub Desktop.
Save donrestarone/2660c91002d4d09af8221a83210b3d93 to your computer and use it in GitHub Desktop.
cors setup for http-only cookies
Rails.application.config.middleware.insert_before 0, Rack::Cors, debug: true do
allow do
origins 'http://client.your-domain-here.ngrok.io'
resource '*',
headers: :any,
methods: [:get, :post, :put, :patch, :delete, :options, :head]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment