Skip to content

Instantly share code, notes, and snippets.

@NicholusMuwonge
Created October 24, 2020 15:12
Show Gist options
  • Save NicholusMuwonge/3b2832a7a4019b3332aeb21da3ea6048 to your computer and use it in GitHub Desktop.
Save NicholusMuwonge/3b2832a7a4019b3332aeb21da3ea6048 to your computer and use it in GitHub Desktop.
config.session_store :cookie_store, key: '_interslice_session'
config.middleware.use ActionDispatch::Cookies # Required for all session management
config.middleware.use ActionDispatch::Session::CookieStore, config.session_options
# I added this for cors to be able to accept request from client. for now it accepts from all origins
config.middleware.use Rack::Cors do
allow do
origins '*'
resource '*',
headers: :any,
expose: %w[access-token expired token-type uid client],
methods: %i[get post options delete put]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment