File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ gem 'faker'
6060
6161gem 'blazer'
6262
63+ gem 'rack-cors'
64+
6365# Use Sass to process CSS
6466# gem "sassc-rails"
6567
Original file line number Diff line number Diff line change 206206 rack (2.2.8 )
207207 rack-accept (0.4.5 )
208208 rack (>= 0.4 )
209+ rack-cors (2.0.1 )
210+ rack (>= 2.0.0 )
209211 rack-test (2.1.0 )
210212 rack (>= 1.3 )
211213 rails (7.0.4.3 )
@@ -334,6 +336,7 @@ DEPENDENCIES
334336 jbuilder
335337 pg
336338 puma (~> 5.0 )
339+ rack-cors
337340 rails (~> 7.0.4 , >= 7.0.4.3 )
338341 redis (~> 4.0 )
339342 rspec-rails
Original file line number Diff line number Diff line change 9090
9191 # Do not dump schema after migrations.
9292 config . active_record . dump_schema_after_migration = false
93+
94+ config . middleware . insert_before ( 0 , Rack ::Cors ) do
95+ allow do
96+ origins 'https://codelearn-api-72b30d70ca73.herokuapp.com/'
97+ resource '*' , headers : :any , methods : %i[ get post patch put delete options ]
98+ end
99+ end
93100end
You can’t perform that action at this time.
0 commit comments