【发布时间】:2017-10-06 06:59:39
【问题描述】:
我需要在robots.txt上引发404 Not Found,同时从HTTP访问,在HTTPS上robots.txt应该正常返回。
我无法找到仅在 app.yaml 配置中限制访问 https 的方法,因此我决定为此编写一个处理程序,但出现以下错误:
google.appengine.api.yaml_errors.EventError: Unexpected attribute "script" for mapping type static_files.
在app.yaml 我有:
- url: /robots.txt
script: main.application
static_files: static/\1
upload: static/robots.txt
处理这种情况的最佳方法是什么?
【问题讨论】: