Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.44 KB | None | 0 0
  1. # config/initializers/cors.rb
  2. # also tried moving this to config/application.rb and config.ru
  3. Rails.application.config.middleware.insert_before 0, Rack::Cors do
  4.   allow do
  5.     origins 'https://example1.com', 'https://example2.com'
  6.     resource '*',
  7.              headers: :any,
  8.              methods: [:get, :options, :head],
  9.              expose: ['access-token', 'expiry', 'token-type', 'uid', 'client'],
  10.              max_age: 0
  11.   end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement