diff --git a/Gemfile.lock b/Gemfile.lock index a3e8f2c50..93a3b557d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -114,8 +114,8 @@ GEM aws-sdk-ses (~> 1, >= 1.50.0) aws-sdk-sesv2 (~> 1, >= 1.34.0) aws-eventstream (1.4.0) - aws-partitions (1.1154.0) - aws-sdk-core (3.232.0) + aws-partitions (1.1212.0) + aws-sdk-core (3.242.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) @@ -123,14 +123,14 @@ GEM bigdecimal jmespath (~> 1, >= 1.6.1) logger - aws-sdk-kms (1.112.0) - aws-sdk-core (~> 3, >= 3.231.0) + aws-sdk-kms (1.121.0) + aws-sdk-core (~> 3, >= 3.241.4) aws-sigv4 (~> 1.5) aws-sdk-rails (5.1.0) aws-sdk-core (~> 3) railties (>= 7.1.0) - aws-sdk-s3 (1.198.0) - aws-sdk-core (~> 3, >= 3.231.0) + aws-sdk-s3 (1.208.0) + aws-sdk-core (~> 3, >= 3.234.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) aws-sdk-ses (1.90.0) @@ -157,7 +157,7 @@ GEM base64 (0.3.0) bcrypt (3.1.20) benchmark (0.4.1) - bigdecimal (3.2.3) + bigdecimal (4.0.1) bindata (2.5.1) bindex (0.8.1) bootsnap (1.18.6) @@ -343,8 +343,8 @@ GEM minitest (5.25.5) msgpack (1.8.0) multi_json (1.17.0) - multi_xml (0.7.2) - bigdecimal (~> 3.1) + multi_xml (0.8.1) + bigdecimal (>= 3.1, < 5) net-http (0.6.0) uri net-imap (0.5.10) @@ -425,7 +425,7 @@ GEM puma (6.6.1) nio4r (~> 2.0) racc (1.8.1) - rack (3.2.1) + rack (3.2.3) rack-attack (6.7.0) rack (>= 1.0, < 4) rack-cors (3.0.0) @@ -615,7 +615,7 @@ GEM unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) uniform_notifier (1.18.0) - uri (1.0.3) + uri (1.0.4) useragent (0.16.11) version_gem (1.1.9) virtus (2.0.0) diff --git a/config/environments/development.rb b/config/environments/development.rb index b384afc5d..f4e9d6d0d 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -99,5 +99,5 @@ # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. # config.generators.apply_rubocop_autocorrect_after_generate! - config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.public_file_server.enabled = true end diff --git a/config/environments/production.rb b/config/environments/production.rb index f9d51f7e1..2a3d7c73b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -18,15 +18,12 @@ # Do not fall back to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Let Cloud Foundry / container platforms serve precompiled assets from /public. - config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? + # We are not running NGINX/Apache server in production so let Rails serve static files from `public/`. + config.public_file_server.enabled = true + # Cache assets for far-future expiry since they are all digest stamped. - # Add CORS headers for static assets to support SRI (Subresource Integrity) checks - # when assets are served from ASSET_HOST (different origin than the page) + # CORS headers are managed by rack-cors, see config/application.rb config.public_file_server.headers = { - 'Access-Control-Allow-Origin' => '*', - 'Access-Control-Allow-Methods' => 'GET, OPTIONS', - 'Access-Control-Allow-Headers' => 'Origin, X-Requested-With, Content-Type, Accept', 'Cache-Control' => "public, max-age=#{1.year.to_i}" } diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 65c377a66..29bbd93fb 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -20,16 +20,10 @@ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). # config.require_master_key = true - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.public_file_server.enabled = true - # Add CORS headers for static assets to support SRI (Subresource Integrity) checks - # when assets are served from ASSET_HOST (different origin than the page) + # Cache assets for far-future expiry since they are all digest stamped. config.public_file_server.headers = { - 'Access-Control-Allow-Origin' => '*', - 'Access-Control-Allow-Methods' => 'GET, OPTIONS', - 'Access-Control-Allow-Headers' => 'Origin, X-Requested-With, Content-Type, Accept', 'Cache-Control' => "public, max-age=#{1.year.to_i}" } diff --git a/package-lock.json b/package-lock.json index ab2bd5d8b..f2f085460 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,7 +4,6 @@ "requires": true, "packages": { "": { - "name": "touchpoints", "dependencies": { "@hotwired/stimulus": "^3.2.2" }, @@ -5773,9 +5772,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "dev": true, "license": "MIT", "engines": { @@ -6315,13 +6314,13 @@ "license": "MIT" }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -7179,16 +7178,73 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" diff --git a/touchpoints.yml b/touchpoints.yml index 92ae2c1ef..a8337fc64 100644 --- a/touchpoints.yml +++ b/touchpoints.yml @@ -11,7 +11,6 @@ applications: LOGIN_GOV_IDP_BASE_URL: https://secure.login.gov/ LOGIN_GOV_REDIRECT_URI: https://touchpoints.app.cloud.gov/users/auth/login_dot_gov/callback RAILS_ENV: production - RAILS_SERVE_STATIC_FILES: "true" TOUCHPOINTS_WEB_DOMAIN: touchpoints.app.cloud.gov INDEX_URL: /admin SKIP_WIDGET_RENDERER: "true"