apache / incubator-pagespeed-ngx

Automatic PageSpeed optimization module for Nginx
http://ngxpagespeed.com/
Apache License 2.0
4.37k stars 363 forks source link

Modify remote configurations on the fly #1754

Closed Hackintoshcorp closed 2 years ago

Hackintoshcorp commented 2 years ago

Hi, how and is it even possible to change the name of the remote configuration file for example by $host variable.

normal config setting: pagespeed RemoteConfigurationUrl https://example.com/remote.conf; dynamic config setting: pagespeed RemoteConfigurationUrl https://$host/remote.conf;

I tried everything but cant get it to work. Do you know how?

oschaaf commented 2 years ago

Do you also have pagespeed ProcessScriptVariables on;

http {
    pagespeed ProcessScriptVariables on;
    server {
        pagespeed LoadFromFileMatch "^https?://$host/" "$document_root/";
    }
}