We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 456d414 commit 492ec9eCopy full SHA for 492ec9e
config/application.rb
@@ -32,5 +32,17 @@ class Application < Rails::Application
32
33
# Default I18n locale
34
config.i18n.default_locale = :ja
35
+
36
+ # セキュリティヘッダーの設定
37
+ config.action_dispatch.default_headers = {
38
+ "X-Frame-Options" => "SAMEORIGIN",
39
+ "X-XSS-Protection" => "0",
40
+ "X-Content-Type-Options" => "nosniff",
41
+ "X-Permitted-Cross-Domain-Policies" => "none",
42
+ "Referrer-Policy" => "strict-origin-when-cross-origin"
43
+ }
44
45
+ # HTML5サニタイザーの使用
46
+ config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
47
end
48
0 commit comments