Skip to content

Instantly share code, notes, and snippets.

@ashishwadekar
Created December 24, 2018 19:08
Show Gist options
  • Select an option

  • Save ashishwadekar/e9ebdd5cb381adbebe3ab29927cd49a1 to your computer and use it in GitHub Desktop.

Select an option

Save ashishwadekar/e9ebdd5cb381adbebe3ab29927cd49a1 to your computer and use it in GitHub Desktop.
Sample CORS for Devise JWT
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*',
headers: %w(Authorization),
methods: :any,
expose: %w(Authorization),
max_age: 600
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment