Skip to content

Commit b143810

Browse files
author
David Heinemeier Hansson
committed
Moved from railties
1 parent 156a88d commit b143810

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/install/template.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
RUBY
5454
end
5555

56+
if (csp_config_path = Rails.root.join("config/initializers/content_security_policy.rb")).exist?
57+
say "Make note of webpack-dev-server exemption needed to csp"
58+
insert_into_file csp_config_path, <<-RUBY, after: %(# Rails.application.config.content_security_policy do |policy|)
59+
# # If you are using webpack-dev-server then specify webpack-dev-server host
60+
# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
61+
RUBY
62+
end
63+
5664
results = []
5765

5866
Dir.chdir(Rails.root) do

0 commit comments

Comments
 (0)