app/controllers/extface/jobs_controller.rb in extface-0.4.1b vs app/controllers/extface/jobs_controller.rb in extface-0.4.2a
- old
+ new
@@ -1,9 +1,16 @@
require_dependency "extface/application_controller"
module Extface
class JobsController < ApplicationController
include ActionController::Live
+
+ skip_before_filter :include_extra_module
+ before_action :allow_cross_origin
+
+ def allow_cross_origin
+ headers['Access-Control-Allow-Origin'] = '*'
+ end
def show
response.headers['Content-Type'] = 'text/event-stream'
@job = Job.find(params[:id])
if @job.completed?