Skip to content

Commit

Permalink
Use same CORS policy for /@:username and /users/:username (mastodon#9485
Browse files Browse the repository at this point in the history
)

Fixes mastodon#8189

rack-cors being called before the application router, it does not follow
the redirection, and we need a separate rule for /users/:username.
  • Loading branch information
ClearlyClaire authored and hiyuki2578 committed Oct 2, 2019
1 parent 26e632a commit 2c4a319
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/initializers/cors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
headers: :any,
methods: [:get],
credentials: false
resource '/users/:username',
headers: :any,
methods: [:get],
credentials: false
resource '/api/*',
headers: :any,
methods: [:post, :put, :delete, :get, :patch, :options],
Expand Down

0 comments on commit 2c4a319

Please sign in to comment.