Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1535

Rewrite urls for cdn on http and https

$
0
0

We are running mod-pagespeed on several Apache nodes behind a varnish which sits behind an ngnix which handles https.So all request arrive Apache as http but with an extra x-proto header.

PageSpeed works fine on http and rewrites URLs to the desired cdn domain, yet fails to do so in https requests.

The settings:

ModPagespeedRespectXForwardedProto onModPagespeedDomain mycdn.azureedge.netModPagespeedMapRewriteDomain mycdn.azureedge.net *mydomain.com

where mycdn.azureedge.net is the cdn and anything mydomain.com is my website.

My complete mod_pagespeed config can be found here.

If I do set ModPagespeedRespectXForwardedProto to off, for https requests, links are rewritten to the cdn but with http as the protocol.

I did set up a local machine (with docker) to test this locally and have the same problem. Thou Pagespeed works fine for http, URLs are not rewritten for https. If I use debug filter, the debug information is added even in https requests so Pagespeed is definitively running for both protocols.

I added the stats_log_global output as a pastebin here and the debug log output from the html here as well.

How do I get pageSpeed to rewrite those URLs on https requests as well?


Viewing all articles
Browse latest Browse all 1535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>