Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Commit 925b5a8

Browse files
committed
0.1.6: Don't generate a CORS error on a JS 404
1 parent 489cd5f commit 925b5a8

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

lib/outpost/controller/custom_errors.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ def render_error(status, e=StandardError, template_prefix="outpost/")
6464
)
6565
end
6666

67+
68+
format.js do
69+
# Render an asset 404 without blowing up on CORS
70+
@marked_for_same_origin_verification = false
71+
render(
72+
:text => "#{status} - #{response.message}",
73+
:status => status
74+
)
75+
end
76+
6777
format.any do
6878
head status
6979
end

lib/outpost/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Outpost
2-
VERSION = "0.1.5"
2+
VERSION = "0.1.6"
33
end

0 commit comments

Comments
 (0)