Permalink
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (23 sloc) 545 Bytes
require 'rack/cors'
require 'rack/ssl-enforcer'
require 'raven'
require 'travis/yaml/web'
require 'travis/yaml/web/basic_auth'
require 'travis/yaml/web/env'
if Travis::Yaml::Web::Env.staging?
use Rack::Cors do
allow do
origins '*'
resource '*', headers: :any, methods: :post
end
end
end
use Rack::SslEnforcer if Travis::Yaml::Web::Env.production?
use Travis::Yaml::Web::BasicAuth
if ENV['SENTRY_DSN']
Raven.configure do |config|
config.dsn = ENV['SENTRY_DSN']
end
use Raven::Rack
end
run Travis::Yaml::Web