Skip to content

Instantly share code, notes, and snippets.

@schof
Created October 5, 2010 17:27
Show Gist options
  • Select an option

  • Save schof/611949 to your computer and use it in GitHub Desktop.

Select an option

Save schof/611949 to your computer and use it in GitHub Desktop.
# Contains logic for enforcing SSL under certain conditions.
module Spree
class SslConstraint
def matches?(request)
return true if ((Rails.env.development? || Rails.env.test?) && Spree::Config[:allow_ssl_in_development_and_test])
(Rails.env.staging? || Rails.env.production?) && Spree::Config[:allow_ssl_in_production]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment