我最近在Google App Engine中设置了一个Node.js应用程序,运行正常.我尝试添加处理程序,以便可以将对网站的所有请求重定向到https URL.以下是我的app.yaml档案
# [START runtime]
runtime: nodejs
vm: true
# [END runtime]
# Temporary setting to keep gcloud from uploading node_modules
skip_files:
- ^node_modules$
# [START handlers]
handlers:
- url: /.*
secure: always
# [END handlers]
Run Code Online (Sandbox Code Playgroud)
当我尝试运行上传脚本时gcloud preview app deploy app.yaml,它会抛出异常:
ERROR: (gcloud.preview.app.deploy) An error occurred while parsing file: [/Users/rakesharidasan/BackwaterBreaks-UI-Release/app.yaml]
Unknown url handler type in line 14, column 17 (end of # [END handlers]).
Run Code Online (Sandbox Code Playgroud)
我可以在StackOverflow中看到类似的问题,但其中许多都与缩进或空白问题有关.我相信我的app.yaml得到了正确的缩进,我通过几个在线解析器检查了它,例如 - http://codebeautify.org/yaml-validator
如果我从yaml中删除处理程序部分,上载脚本仍将运行.
任何想法在这里出了什么问题?