瀏覽代碼

Use same CORS policy for /@:username and /users/:username (#9485)

Fixes #8189

rack-cors being called before the application router, it does not follow
the redirection, and we need a separate rule for /users/:username.
master
ThibG 5 年之前
committed by Eugen Rochko
父節點
當前提交
3f12c07ff5
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      config/initializers/cors.rb

+ 4
- 0
config/initializers/cors.rb 查看文件

@@ -17,6 +17,10 @@ Rails.application.config.middleware.insert_before 0, Rack::Cors do
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],


Loading…
取消
儲存