Merge remote-tracking branch 'origin/pr/28'
This commit is contained in:
commit
e8a575bd50
|
@ -1,5 +1,6 @@
|
||||||
class Api::EventTypesController < Api::ApplicationController
|
class Api::EventTypesController < Api::ApplicationController
|
||||||
include ::CurrentConferenceAssigning
|
include ::CurrentConferenceAssigning
|
||||||
|
include ::PublicApiExposing
|
||||||
before_filter :require_current_conference!
|
before_filter :require_current_conference!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
class Api::EventsController < Api::ApplicationController
|
class Api::EventsController < Api::ApplicationController
|
||||||
include ::CurrentConferenceAssigning
|
include ::CurrentConferenceAssigning
|
||||||
|
include ::PublicApiExposing
|
||||||
before_filter :require_current_conference!
|
before_filter :require_current_conference!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
class Api::HallsController < Api::ApplicationController
|
class Api::HallsController < Api::ApplicationController
|
||||||
include ::CurrentConferenceAssigning
|
include ::CurrentConferenceAssigning
|
||||||
|
include ::PublicApiExposing
|
||||||
before_filter :require_current_conference!
|
before_filter :require_current_conference!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
class Api::SlotsController < Api::ApplicationController
|
class Api::SlotsController < Api::ApplicationController
|
||||||
include ::CurrentConferenceAssigning
|
include ::CurrentConferenceAssigning
|
||||||
|
include ::PublicApiExposing
|
||||||
before_filter :require_current_conference!
|
before_filter :require_current_conference!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
class Api::SpeakersController < Api::ApplicationController
|
class Api::SpeakersController < Api::ApplicationController
|
||||||
include ::CurrentConferenceAssigning
|
include ::CurrentConferenceAssigning
|
||||||
|
include ::PublicApiExposing
|
||||||
before_filter :require_current_conference!
|
before_filter :require_current_conference!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
class Api::TracksController < Api::ApplicationController
|
class Api::TracksController < Api::ApplicationController
|
||||||
include ::CurrentConferenceAssigning
|
include ::CurrentConferenceAssigning
|
||||||
|
include ::PublicApiExposing
|
||||||
before_filter :require_current_conference!
|
before_filter :require_current_conference!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
require 'active_support/concern'
|
||||||
|
|
||||||
|
module PublicApiExposing
|
||||||
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
|
def set_access_control_headers
|
||||||
|
if request.format.json?
|
||||||
|
response.headers['Access-Control-Allow-Origin'] = '*'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
included do
|
||||||
|
before_action :set_access_control_headers
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue