This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Description
My server serve pages via https (http/2) and redirect every http traffic to https.
I had few issues but somehow resolve most of them:
- the
<noscript><meta http-equiv=refresh content="0;url='**http**://redacted/?PageSpeed=noscript'"/>... that pagespeed included was HTTP instead of HTTPS, that was resolve via disabling adding code and add it manually. pagespeed SupportNoScriptEnabled false;
- the issue that I have now (I don't know if that's gonna be big issue or not) is that the beacon is added with
http instead of http**s**. I tried rewriting beacon url but that append to value before /ngx_pagespeed_beacon and not the http://redacted part.
pagespeed.CriticalImages.Run('/ngx_pagespeed_beacon','http://redacted/','gLvPo-P25G',false,true,'zFnuPmTKJDs');
The beacon is hosted correctly and POST is send to correct endpoint but the url that is passed to it is with bad protocol (http instead of https)
https://redacted/ngx_pagespeed_beacon?url=http://redacted/
I have:
pagespeed Domain https://redacted;
# pagespeed MapOriginDomain "https://redacted" "http://redacted"; # this one doesn't affect beacon so this one is turn off
pagespeed MapRewriteDomain "https://redacted" "http://redacted"
pagespeed LoadFromFile "https://redacted/wp-content/" "/var/www/wp-content/";
pagespeed LoadFromFile "http://redacted/wp-content/" "/var/www/wp-content/";
sadly if I dont add LoadFromFile for http address my site break as it get error in console:
# [Warning] [1502319] [image.webp:0] Resource based on http://redacted/wp-content/uploads/2022/07/image.webp but cannot access the original
Also I see a lot http logs on pagespeed_admin console tab and im unsure if its hardcoded or HTTPS is not fully supported.
nginx 1.23
pagespeed 1.14.36.1-0