Created
December 24, 2018 19:08
-
-
Save ashishwadekar/e9ebdd5cb381adbebe3ab29927cd49a1 to your computer and use it in GitHub Desktop.
Sample CORS for Devise JWT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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