Score:1

Apache 2 Reverse Proxy, Internal application hardcoded with http

gb flag

I have set up Apache reverse proxy with https enabled, Apache (https) -> Internal Applications (http)

However, some resources such as javascript are still in http form, possibly hard coded using http , so they will be blocked by the browser (strict-origin-when-cross-origin).

How to rewrite or redirect response from internal app to https

http://subdomain.myserver.com/js/somefile.js To https://subdomain.myserver.com/js/somefile.js , before reaching the browser

this is my configuration

<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>

Thank you.

Michael Hampton avatar
cz flag
You cannot fix the application?
Ismet SK avatar
gb flag
Unfortunately yes
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.