Authorizing domains

Authorizing and Mapping Urls and Domains

In addition to optimizing HTML resources, PageSpeed restricts itself to optimizing resources (JavaScript, CSS, images) that are served from domains, with optional paths, that must be explicitly listed in the configuration file. For example:

pagespeed Domain http://example.com pagespeed Domain cdn.example.com pagespeed Domain http://styles.example.com/css pagespeed Domain *.example.org

PageSpeed will rewrite resources found from these explicitly listed domains, although in the case of styles.example.com only resources under the css directory will be rewritten. Additionally, it will rewrite resources that are served from the same domain as the HTML file, or are specified as a path relative to the HTML. When resources are rewritten, their domain and path are not changed. However, the leaf name is changed to encode rewriting information that can be used to identify and serve the optimized resource.

The leading "http://" is optional; bare hostnames will be interpreted as referring to HTTP. Wildcards can be used in the domain.

These directives can be used in location-specific configuration sections.