【问题标题】:How to disable URLs from PageSpeed Service on App Engine?如何在 App Engine 上禁用来自 PageSpeed 服务的 URL?
【发布时间】:2013-05-23 21:07:33
【问题描述】:

PageSpeed 服务不应触及某些 URL。根据https://developers.google.com/appengine/docs/python/config/appconfig#pagespeed,我只需要将这些 URL 添加到我的app.yaml 中的url_blacklist 字段中。但是,它似乎不起作用。

这是我所拥有的:

pagespeed:
  enabled_rewriters:
    - InlineImages
    - CollapseWhitespace
    - RemoveComments
    - InlineJs
  url_blacklist:
    - http://*/code/out/*
    - https://*/code/out/*

PageSpeed 服务仍在处理此 URL:

http://www.dartlang.org/web-ui/observables/code/out/hello_world.html

我做错了什么?如何以通用方式排除我的 URL? (如果可能,我想使用 * 通配符来避免指定每个 URL)

谢谢!

【问题讨论】:

    标签: google-app-engine pagespeed


    【解决方案1】:

    我使用以下配置解决了这个问题:

    pagespeed:
      enabled_rewriters:
        - InlineImages
        - CollapseWhitespace
        - RemoveComments
        - InlineJs
      url_blacklist:
        - http://www.dartlang.org/*/code/out/*
        - https://www.dartlang.org/*/code/out/*
    

    这很有趣,因为docs 暗示我可以做到http://*/*.svg

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-06
      • 2020-02-15
      • 2019-07-01
      相关资源
      最近更新 更多