From 208932edc83a2276d2e5d9d5457d2d19bc4a60ee Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 25 Jul 2023 11:41:59 +0200 Subject: [PATCH] reverse changes --- Gemfile | 1 - Gemfile.lock | 3 --- config/application.rb | 9 --------- config/initializers/mime_types.rb | 4 ---- frontend/config/environment.js | 3 --- 5 files changed, 20 deletions(-) diff --git a/Gemfile b/Gemfile index 96d15fe08..a1c774548 100644 --- a/Gemfile +++ b/Gemfile @@ -34,7 +34,6 @@ group :development, :test do gem 'launchy' gem 'mocha' gem 'pry-byebug' - gem 'rack-cors' gem 'rails-controller-testing' gem 'rails-erd' gem 'rspec-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 372394682..e2dedf172 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -214,8 +214,6 @@ GEM activesupport (>= 3.0.0) racc (1.7.1) rack (2.2.7) - rack-cors (2.0.1) - rack (>= 2.0.0) rack-oauth2 (1.21.3) activesupport attr_required @@ -397,7 +395,6 @@ DEPENDENCIES pry-stack_explorer puma pundit - rack-cors rails (~> 7.0) rails-controller-testing rails-erd diff --git a/config/application.rb b/config/application.rb index 031b7cad5..744034189 100644 --- a/config/application.rb +++ b/config/application.rb @@ -67,15 +67,6 @@ class Application < Rails::Application # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" - config.middleware.insert_before 0, Rack::Cors do - allow do - origins 'http://localhost:4200' - resource '/text-security-disc.woff2', headers: :any, methods: [:get, :post] - resource '/text-security-disc-compat.eot', headers: :any, methods: [:get, :post] - resource '/text-security-disc-compat.ttf', headers: :any, methods: [:get, :post] - end - end - # https://stackoverflow.com/questions/72970170/upgrading-to-rails-6-1-6-1-causes-psychdisallowedclass-tried-to-load-unspecif # https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017 config.after_initialize do diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index 7c8cbe80a..dc1899682 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -2,7 +2,3 @@ # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf - -Mime::Type.register "font/woff2", :woff2 -Mime::Type.register "application/vnd.ms-fontobject", :eot -Mime::Type.register "application/x-font-ttf", :ttf diff --git a/frontend/config/environment.js b/frontend/config/environment.js index aa30bafd1..36a04e22e 100644 --- a/frontend/config/environment.js +++ b/frontend/config/environment.js @@ -4,9 +4,6 @@ module.exports = function (environment) { let ENV = { modulePrefix: "frontend", environment, - contentSecurityPolicy: { - 'font-src': "'self' http://localhost:4200" - }, rootURL: "/", locationType: "history", sentryDsn: "",