소스 검색

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],


불러오는 중...
취소
저장