Merge pull request #10339 from mkllnk/ssl

Remove unnecessary SSL code
This commit is contained in:
Filipe
2023-02-01 13:06:26 +00:00
committed by GitHub
8 changed files with 14 additions and 19 deletions

View File

@@ -92,7 +92,6 @@ gem 'gmaps4rails'
gem 'mimemagic', '> 0.3.5'
gem 'paper_trail', '~> 12.1.0'
gem 'rack-rewrite'
gem 'rack-ssl', require: 'rack/ssl'
gem 'roadie-rails'
gem 'hiredis'

View File

@@ -495,8 +495,6 @@ GEM
rack-proxy (0.7.0)
rack
rack-rewrite (1.5.1)
rack-ssl (1.4.1)
rack
rack-test (2.0.2)
rack (>= 1.3)
rack-timeout (0.6.3)
@@ -846,7 +844,6 @@ DEPENDENCIES
puma
rack-mini-profiler (< 3.0.0)
rack-rewrite
rack-ssl
rack-timeout
rails (>= 6.1.4)
rails-controller-testing

View File

@@ -6,7 +6,6 @@ module Spree
def edit
@preferences_general = [:site_name, :default_seo_title, :default_meta_keywords,
:default_meta_description, :site_url]
@preferences_security = [:allow_ssl_in_production, :allow_ssl_in_staging]
@preferences_currency = [:display_currency, :hide_cents]
end

View File

@@ -33,8 +33,6 @@ module Spree
preference :allow_backorder_shipping, :boolean, default: false
preference :allow_checkout_on_gateway_error, :boolean, default: false
preference :allow_guest_checkout, :boolean, default: true
preference :allow_ssl_in_production, :boolean, default: true
preference :allow_ssl_in_staging, :boolean, default: true
# Replace with the name of a zone if you would like to limit the countries
preference :checkout_zone, :string, default: nil
preference :currency, :string, default: "USD"

View File

@@ -17,14 +17,6 @@
.row
.alpha.six.columns
%fieldset.security.no-border-bottom
%legend{:align => "center"}= Spree.t(:security_settings)
- @preferences_security.each do |key|
- type = Spree::Config.preference_type(key)
.field
= label_tag(key, Spree.t(key) + ': ') + tag(:br) if type != :boolean
= preference_field_tag(key, Spree::Config[key], :type => type)
= label_tag(key, Spree.t(key)) + tag(:br) if type == :boolean
%fieldset.legal.no-border-bottom
%legend{:align => "center"}= t('.legal_settings')
.field

View File

@@ -3665,9 +3665,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
default_seo_title: "Default Seo Title"
default_meta_description: "Default Meta Description"
default_meta_keywords: "Default Meta Keywords"
security_settings: "Security Settings"
allow_ssl_in_production: "Allow SSL to be used in production mode"
allow_ssl_in_staging: "Allow SSL to be used in staging mode"
currency_decimal_mark: "Currency decimal mark"
currency_settings: "Currency Settings"
currency_symbol_position: Put "currency symbol before or after dollar amount?"

View File

@@ -0,0 +1,13 @@
# frozen_string_literal: true
class DeleteSslPreferences < ActiveRecord::Migration[6.1]
def up
execute <<~SQL
DELETE FROM spree_preferences
WHERE key IN (
'/spree/app_configuration/allow_ssl_in_production',
'/spree/app_configuration/allow_ssl_in_staging'
)
SQL
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2023_01_17_043628) do
ActiveRecord::Schema.define(version: 2023_01_30_032659) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"