チームの皆様
Discourse を AWS ECS 上で実行しています。アプリケーションを実行しようとしたところ、ブラウザのコンソールタブが以下の URL でエラーになっています。何か設定変更を見落としているでしょうか?
Mixed Content: ページ ‘https://discuss-stage.tllms.com/finish-installation/register’ が HTTPS で読み込まれましたが、安全でないファビコン ‘http://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/uploads/default/optimized/1X/_129430568242d1b7f853bb13ebea28b3f6af4e7_2_32x32.png’ のリクエストが送信されました。このリクエストはブロックされました。コンテンツは HTTPS で提供される必要があります。
上記の URL において、discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com は私のデータベースエンドポイントです。
上記のエンドポイントを database.yml ファイルに指定しています。
Discourse を Docker を使用して ECS にデプロイしました。アプリケーションにアクセスしようとすると、ネットワークブラウザが https://discuss-stage.tllms.com/ ではなく、以下の URL からリソースを取得しようとしています。
これは、database.yml ファイルで使用されている RDS エンドポイント discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com です。
Mixed Content: ページ ‘https://discuss-stage.tllms.com/’ が HTTPS で読み込まれましたが、安全でないファビコン ‘http://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/uploads/default/optimized/1X/_129430568242d1b7f853bb13ebea28b3f6af4e7_2_32x32.png’ のリクエストが送信されました。このリクエストはブロックされました。コンテンツは HTTPS で提供される必要があります。
Content Security Policy のディレクティブ “script-src https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/logs/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/sidekiq/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/mini-profiler-resources/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/assets/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/brotli_asset/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/extra-locales/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/highlight-js/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/javascripts/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/plugins/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/theme-javascripts/ https://discourse-test.c0fbtc1q6bvm.ap-south-1.rds.amazonaws.com/svg-sprite/” に違反するため、スクリプト ‘https://discuss-stage.tllms.com/assets/browser-detect.js’ の読み込みが拒否されました。‘script-src-elem’ が明示的に設定されていないため、‘script-src’ がフォールバックとして使用されています。