Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
cors
Browse files Browse the repository at this point in the history
  • Loading branch information
reesericci committed Jan 26, 2024
1 parent 6e8770c commit 8af41c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,5 @@ gem "syntax_suggest", "~> 2.0"
gem "doorkeeper", "~> 5.6"

gem "doorkeeper-openid_connect", "~> 1.8"

gem "rack-cors", "~> 2.0"
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ GEM
marcel (1.0.2)
matrix (0.4.2)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.21.2)
msgpack (1.7.2)
multi_xml (0.6.0)
Expand Down Expand Up @@ -230,6 +229,8 @@ GEM
nio4r (~> 2.0)
racc (1.7.3)
rack (3.0.8)
rack-cors (2.0.1)
rack (>= 2.0.0)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
Expand Down Expand Up @@ -461,6 +462,7 @@ DEPENDENCIES
postmark-rails
propshaft
puma (~> 6.0)
rack-cors (~> 2.0)
rails (~> 7.1.2)
rails_hotreload
rails_nestable_layouts!
Expand Down
7 changes: 7 additions & 0 deletions config/initializers/cors.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'

Check failure on line 3 in config/initializers/cors.rb

View workflow job for this annotation

GitHub Actions / StandardRB

config/initializers/cors.rb#L3

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
resource '/api/*', headers: :any, methods: [:get, :post, :patch, :put]

Check failure on line 4 in config/initializers/cors.rb

View workflow job for this annotation

GitHub Actions / StandardRB

config/initializers/cors.rb#L4

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
resource '/.well-known/*', headers: :any, methods: [:get, :post, :patch, :put]

Check failure on line 5 in config/initializers/cors.rb

View workflow job for this annotation

GitHub Actions / StandardRB

config/initializers/cors.rb#L5

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
end
end

0 comments on commit 8af41c8

Please sign in to comment.