Sha256: 357c88736d3027c93f65b93478d35954f854c294e22ed572a20ce8ec9376569f
Contents?: true
Size: 839 Bytes
Versions: 20
Compression:
Stored size: 839 Bytes
Contents
require "padrino-core" require "haml" require "pact_broker/services" module PactBroker module UI module Controllers class Base < Padrino::Application set :root, File.join(File.dirname(__FILE__), "..") set :show_exceptions, ENV["RACK_ENV"] != "production" set :dump_errors, false # The padrino logger logs these for us. If this is enabled we get duplicate logging. def base_url # Using the X-Forwarded headers in the UI can leave the app vulnerable # https://www.acunetix.com/blog/articles/automated-detection-of-host-header-attacks/ # Either use the explicitly configured base url or an empty string, # rather than request.base_url, which uses the X-Forwarded headers. env["pactbroker.base_url"] || "" end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems