117 строки
2.6 KiB
YAML
117 строки
2.6 KiB
YAML
runtime: python27
|
|
threadsafe: true
|
|
api_version: 1
|
|
instance_class: F2
|
|
|
|
# default_expiration: "30s"
|
|
|
|
builtins:
|
|
- remote_api: on
|
|
|
|
handlers:
|
|
|
|
# Static handlers ---------------------------------------------------------------
|
|
- url: /favicon\.ico
|
|
static_files: static/img/chromium-128.png
|
|
upload: static/img/chromium-128\.png
|
|
|
|
- url: /robots\.txt
|
|
static_files: static/robots.txt
|
|
upload: static/robots\.txt
|
|
|
|
- url: /service-worker\.js
|
|
static_files: static/dist/service-worker.js
|
|
upload: static/dist/service-worker\.js
|
|
application_readable: true
|
|
expiration: "0m"
|
|
secure: always
|
|
|
|
- url: /firebase-messaging-sw\.js
|
|
static_files: static/firebase-messaging-sw.js
|
|
upload: static/firebase-messaging-sw\.js
|
|
# application_readable: true
|
|
expiration: "0m"
|
|
secure: always
|
|
|
|
- url: /static
|
|
static_dir: static
|
|
#expiration: 30s
|
|
application_readable: true # So static assets can be read by inline_file django tag.
|
|
http_headers:
|
|
Access-Control-Allow-Origin: "*"
|
|
|
|
# Metrics data handlers --------------------------------------------------------
|
|
- url: /data/.*
|
|
script: metrics.app
|
|
|
|
# Admin ------------------------------------------------------------------------
|
|
- url: /cron/.*
|
|
script: admin.app
|
|
login: admin # Prevents raw access to this handler. Cron runs as admin.
|
|
|
|
- url: /tasks/.*
|
|
script: notifier.app
|
|
login: admin # Prevents raw access to this handler. Tasks runs as admin.
|
|
|
|
- url: /admin/gae/.*
|
|
script: google.appengine.ext.admin.application
|
|
login: admin
|
|
|
|
- url: /admin/blink.*
|
|
script: blink_handler.app
|
|
login: required # non-admin
|
|
secure: always
|
|
|
|
- url: /admin/subscribers.*
|
|
script: blink_handler.app
|
|
login: required # non-admin
|
|
secure: always
|
|
|
|
- url: /admin/features/.*
|
|
script: admin.app
|
|
login: required # non-admin
|
|
secure: always
|
|
|
|
- url: /admin/users/.*
|
|
script: users.app
|
|
login: admin
|
|
secure: always
|
|
|
|
- url: /admin/notifications/.*
|
|
script: notifier.app
|
|
login: admin
|
|
secure: always
|
|
|
|
- url: /admin/.*
|
|
script: google.appengine.ext.admin.application
|
|
login: admin
|
|
secure: always
|
|
|
|
# Main server handlers ---------------------------------------------------------
|
|
# features.xml needs to support HTTP as well as HTTPS, as some RSS backends don't support SNI certs.
|
|
# Same issue as what's described at https://github.com/Polymer/blog/issues/7
|
|
- url: /(features|samples).xml
|
|
script: server.app
|
|
secure: optional
|
|
|
|
- url: /features/push/.*
|
|
script: notifier.app
|
|
secure: always
|
|
|
|
- url: /features/star/.*
|
|
script: notifier.app
|
|
secure: always
|
|
|
|
- url: /features/schedule.*
|
|
script: schedule.app
|
|
secure: always
|
|
|
|
# Everything else
|
|
- url: /.*
|
|
script: server.app
|
|
secure: always
|
|
|
|
includes:
|
|
- skip_files.yaml
|
|
- env_vars.yaml
|