【发布时间】:2017-09-17 19:00:13
【问题描述】:
我的 app.yaml 文件有问题 - 我在 AppEngine 上有一个带有 python 运行时的单页应用程序(Angular2 应用程序),但深层链接没有正确路由。这是我的 app.yaml 文件:
runtime: python27
api_version: 1
threadsafe: true
skip_files:
- ^(.*/)?app\.yaml
- ^(.*/)?app\.yml
- ^(.*/)?#.*#
- ^(.*/)?.*~
- ^(.*/)?.*\.py[co]
- ^(.*/)?.*/RCS/.*
- ^(.*/)?\..*
- ^(.*/)?tests$
- ^(.*/)?test$
- ^test/(.*/)?
- ^COPYING.LESSER
- ^README\..*
- \.gitignore
- ^\.git/.*
- \.*\.lint$
- ^fabfile\.py
- ^testrunner\.py
- ^grunt\.js
- ^node_modules/(.*/)?
- ^src/(.*/)?
- ^e2e/(.*/)?
handlers:
- url: /
static_files: dist/index.html
upload: dist/index.html
- url: /(.*)
static_files: dist/\1
upload: dist/(.*)
直接转到深层链接时出现以下错误:
我假设第二个处理程序在做什么,但是我如何编写我的处理程序以将除资产之外的所有内容发送到 index.html?这是我的 dist 目录:
【问题讨论】:
标签: angular google-app-engine single-page-application app.yaml