【发布时间】:2020-12-31 16:50:27
【问题描述】:
我有一个非常好的 express node.js 应用程序,它服务于 http 请求。我把它放在 Google Cloud App Engine 上。
它可以很好地为页面提供服务,但有时当我访问该页面时,我会看到一个白页,上面写着:
Cannot Get /
如果我刷新页面,则照常提供。
这种情况经常发生在我对网站的初始请求中。我使用自定义域。
如何跟踪此错误,它不会显示在日志查看器中。这是什么原因?
app.yaml
runtime: nodejs12
env_variables:
BUCKET_NAME: "example-gcs-bucket"
handlers:
- url: /.*
secure: always
script: auto
【问题讨论】:
-
trackdailywork.com 是我的域名
-
使用 Chrome 或其他调试器:
Content Security Policy of your site blocks some resources because their origin is not included in the content security policy header -
找到了类似的Dynamic HTML Page in App Engine. Returns Cannot Get /index,它可以告诉我们你的 app.yaml 文件中可能有一些有趣的东西。你能和我们分享一下吗?请务必删除所有敏感信息。
-
另外,您使用的是 App Engine Standard 还是 Flex?
-
我认为是标准版,有免费层,但不知道在哪里可以找到该信息。
标签: http google-app-engine google-cloud-platform