为Google创建一个防火墙规则,禁止其请求Acme Challenge文件。
示例代码:
network:
name: default
ingress:
- action: deny
priority: 1000
description: Deny requests for Acme Challenge file from Google
sourceRanges:
- 0.0.0.0/0
destinationRanges:
- XX.XX.XX.XX/32 # replace with Google's IP address range
ports:
- protocol: tcp
portRanges:
- 80
- 443
其中,XX.XX.XX.XX/32需要用Google的IP地址范围替代。将上述代码添加到应用的app.yaml文件中,并使用gcloud命令部署。这样,在Appengine上,Google将无法请求Acme Challenge文件。