File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ gem "jbuilder", "~> 2.7"
34
34
35
35
gem "view_component" , require : "view_component/engine"
36
36
gem "view_component_storybook"
37
+ gem "rack-cors"
37
38
38
39
group :development , :test do
39
40
# Call "byebug" anywhere in the code to stop execution and get a debugger console
Original file line number Diff line number Diff line change 138
138
nio4r (~> 2.0 )
139
139
racc (1.5.2 )
140
140
rack (2.2.3 )
141
+ rack-cors (1.1.1 )
142
+ rack (>= 2.0.0 )
141
143
rack-test (1.1.0 )
142
144
rack (>= 1.0 , < 3 )
143
145
rails-dom-testing (2.0.3 )
@@ -191,6 +193,7 @@ DEPENDENCIES
191
193
importmap-rails (>= 0.3.4 )
192
194
jbuilder (~> 2.7 )
193
195
puma (~> 5.0 )
196
+ rack-cors
194
197
rails !
195
198
selenium-webdriver
196
199
sqlite3 (~> 1.4 )
Original file line number Diff line number Diff line change 64
64
65
65
# Uncomment if you wish to allow Action Cable access from any origin.
66
66
# config.action_cable.disable_request_forgery_protection = true
67
+
68
+ config . middleware . insert_before 0 , Rack ::Cors do
69
+ allow do
70
+ origins '*'
71
+ resource '/rails/stories/*' , :headers => :any , :methods => [ :get ]
72
+ end
73
+ end
67
74
end
You can’t perform that action at this time.
0 commit comments