Skip to content

Commit 8e8560d

Browse files
committed
fix(route): js without xhr
1 parent 21ad119 commit 8e8560d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

app/controllers/errors_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class ErrorsController < ApplicationController
2+
skip_before_action :verify_authenticity_token
3+
24
def not_found
35
respond_to do |format|
46
format.json { render json: { message: 'Page not found' }, status: 404 }

spec/requests/errors_controller_spec.rb

+5
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,10 @@
2727
post '/api'
2828
expect(response.status).to eq(404)
2929
end
30+
31+
it 'js no xhr' do
32+
get '/_dwr/interface/WbmemberDWR.js'
33+
expect(response.status).to eq(404)
34+
end
3035
end
3136
end

0 commit comments

Comments
 (0)