Skip to content

Commit

Permalink
add new source for posts and comments in cors for guest mode
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungHypo committed Dec 6, 2024
1 parent eb7a1c7 commit 6756137
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/initializers/cors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
allow do
origins 'http://localhost:8000',
/\Ahttp:\/\/.*\.elasticbeanstalk\.com\z/

resource '/api/posts',
headers: :any,
methods: [:get, :post],
credentials: false

resource '/api/comments',
headers: :any,
methods: [:get, :post],
credentials: false

resource '/api/*',
headers: :any,
Expand Down

0 comments on commit 6756137

Please sign in to comment.