Skip to content

Commit 2c4a319

Browse files
ClearlyClairehiyuki2578
authored andcommitted
Use same CORS policy for /@:username and /users/:username (mastodon#9485)
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.
1 parent 26e632a commit 2c4a319

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

config/initializers/cors.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
headers: :any,
1818
methods: [:get],
1919
credentials: false
20+
resource '/users/:username',
21+
headers: :any,
22+
methods: [:get],
23+
credentials: false
2024
resource '/api/*',
2125
headers: :any,
2226
methods: [:post, :put, :delete, :get, :patch, :options],

0 commit comments

Comments
 (0)