Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/704; Allow csp font locally #711

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reverse changes
  • Loading branch information
kcinay055679 committed Jul 25, 2023
commit 208932edc83a2276d2e5d9d5457d2d19bc4a60ee
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -397,7 +395,6 @@ DEPENDENCIES
pry-stack_explorer
puma
pundit
rack-cors
rails (~> 7.0)
rails-controller-testing
rails-erd
Expand Down
9 changes: 0 additions & 9 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions config/initializers/mime_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions frontend/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ module.exports = function (environment) {
let ENV = {
modulePrefix: "frontend",
environment,
contentSecurityPolicy: {
'font-src': "'self' http://localhost:4200"
},
rootURL: "/",
locationType: "history",
sentryDsn: "",
Expand Down