Apache 2 リバース プロキシ、http でハードコードされた内部アプリケーション

Apache 2 リバース プロキシ、http でハードコードされた内部アプリケーション

httpsを有効にしてApacheリバースプロキシを設定しました。Apache(https)->内部アプリケーション(http)

ただし、JavaScript などの一部のリソースは http 形式のままであり、 http を使用してハードコードされている可能性があるため、ブラウザーによってブロックされます (strict-origin-when-cross-origin)。

内部アプリからの応答を https に書き換えるまたはリダイレクトする方法

http://subdomain.myserver.com/js/somefile.js 宛先httpsブラウザに到達する前に、 ://subdomain.myserver.com/js/somefile.js にアクセスします。

これは私の設定です

<VirtualHost *:80>
    ServerName subdomain.myserver.com   
    RewriteEngine On
    RedirectPermanent / https://subdomain.myserver.com/
</VirtualHost>

<VirtualHost *:443>
    ServerName subdomain.myserver.com
    Header edit Location ^http: https:
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:8090/
    ProxyPassReverse / http://127.0.0.1:8090/
</VirtualHost>

ありがとう。

関連情報