Rails 테스트 케이스에서만 ActionController::InvalidCrossOriginRequest 가 발생하는 경우가 무엇이 있을까요?
조회수 918회
해당 action까지 잘 들어오고 브라우저에서는 동작하는데 이렇게 테스트 케이스에서 콜하게 되면
class SubmissionsControllerTest < ActionController::TestCase
...
test "제출 목록을 가져올 수 있다." do
get :index, tryout_id: @tryout.id, format: :js
end
end
다음과 같은 에러가 발생합니다.
Minitest::UnexpectedError: ActionController::InvalidCrossOriginRequest: Security warning: an embedded <script> tag on another site requested protected JavaScript. If you know what you're doing, go ahead and disable forgery protection on this action to permit cross-origin JavaScript embedding.
발생할 수 있는 경우가 무엇이 있을까요?
-
(•́ ✖ •̀)
알 수 없는 사용자 - 〉
댓글 입력