3b9c78e0创建于 2020年10月7日历史提交
# @license
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

runtime: python27
api_version: 1
threadsafe: true
instance_class: F4_1G

handlers:
- url: /model/(group1-shard1of1)
  secure: always
  static_files: dist/model/\1
  upload: dist/model/(.*)
  http_headers:
    X-Frame-Options: "DENY"
    Strict-Transport-Security: "max-age=2592000; includeSubdomains"
    X-Content-Type-Options: "nosniff"
    X-XSS-Protection: "1; mode=block"
    Content-Security-Policy:
      base-uri 'none';
      object-src 'none';
      font-src 'self'
        *.gstatic.com
        fonts.googleapis.com;
      script-src 'self' 'unsafe-inline'
        *.googleanalytics.com
        *.google-analytics.com
        *.googletagmanager.com
        *.google.com
        *.youtube.com
        *.ytimg.com
        static.doubleclick.net;
      style-src 'self' 'unsafe-inline'
        fonts.googleapis.com
        *.gstatic.com;

- url: /model/(.*\.(pb|json))
  secure: always
  static_files: dist/model/\1
  upload: dist/model/(.*)
  http_headers:
    X-Frame-Options: "DENY"
    Strict-Transport-Security: "max-age=2592000; includeSubdomains"
    X-Content-Type-Options: "nosniff"
    X-XSS-Protection: "1; mode=block"
    Content-Security-Policy:
      base-uri 'none';
      object-src 'none';
      font-src 'self'
        *.gstatic.com
        fonts.googleapis.com;
      script-src 'self' 'unsafe-inline'
        *.googleanalytics.com
        *.google-analytics.com
        *.googletagmanager.com
        *.google.com
        *.youtube.com
        *.ytimg.com
        static.doubleclick.net;
      style-src 'self' 'unsafe-inline'
        fonts.googleapis.com
        *.gstatic.com;

# Static assets (anything with a file extension)
- url: /(.*\..*)
  secure: always
  static_files: dist/\1
  upload: dist/(.*)
  http_headers:
    X-Frame-Options: "DENY"
    Strict-Transport-Security: "max-age=2592000; includeSubdomains"
    X-Content-Type-Options: "nosniff"
    X-XSS-Protection: "1; mode=block"
    Content-Security-Policy:
      base-uri 'none';
      object-src 'none';
      font-src 'self'
        *.gstatic.com
        fonts.googleapis.com;
      script-src 'self' 'unsafe-inline'
        *.googleanalytics.com
        *.google-analytics.com
        *.googletagmanager.com
        *.google.com
        *.youtube.com
        *.ytimg.com
        static.doubleclick.net;
      style-src 'self' 'unsafe-inline'
        fonts.googleapis.com
        *.gstatic.com;

# Root
- url: /
  secure: always
  static_files: dist/index.html
  upload: dist/(.*)
  http_headers:
    X-Frame-Options: "DENY"
    Strict-Transport-Security: "max-age=2592000; includeSubdomains"
    X-Content-Type-Options: "nosniff"
    X-XSS-Protection: "1; mode=block"
    Content-Security-Policy:
      base-uri 'none';
      object-src 'none';
      font-src 'self'
        *.gstatic.com
        fonts.googleapis.com;
      script-src 'self' 'unsafe-inline'
        *.googleanalytics.com
        *.google-analytics.com
        *.googletagmanager.com
        *.google.com
        *.youtube.com
        *.ytimg.com
        static.doubleclick.net;
      style-src 'self' 'unsafe-inline'
        fonts.googleapis.com
        *.gstatic.com;

# Paths with a trailing slash
- url: /(.*\/)
  secure: always
  static_files: dist/\1index.html
  upload: dist/(.*)
  http_headers:
    X-Frame-Options: "DENY"
    Strict-Transport-Security: "max-age=2592000; includeSubdomains"
    X-Content-Type-Options: "nosniff"
    X-XSS-Protection: "1; mode=block"
    Content-Security-Policy:
      base-uri 'none';
      object-src 'none';
      font-src 'self'
        *.gstatic.com
        fonts.googleapis.com;
      script-src 'self' 'unsafe-inline'
        *.googleanalytics.com
        *.google-analytics.com
        *.googletagmanager.com
        *.google.com
        *.youtube.com
        *.ytimg.com
        static.doubleclick.net;
      style-src 'self' 'unsafe-inline'
        fonts.googleapis.com
        *.gstatic.com;

# Paths without a trailing slash
- url: /(.*)?
  secure: always
  static_files: dist/\1/index.html
  upload: dist/(.*)
  http_headers:
    X-Frame-Options: "DENY"
    Strict-Transport-Security: "max-age=2592000; includeSubdomains"
    X-Content-Type-Options: "nosniff"
    X-XSS-Protection: "1; mode=block"
    Content-Security-Policy:
      base-uri 'none';
      object-src 'none';
      font-src 'self'
        *.gstatic.com
        fonts.googleapis.com;
      script-src 'self' 'unsafe-inline'
        *.googleanalytics.com
        *.google-analytics.com
        *.googletagmanager.com
        *.google.com
        *.youtube.com
        *.ytimg.com
        static.doubleclick.net;
      style-src 'self' 'unsafe-inline'
        fonts.googleapis.com
        *.gstatic.com;

skip_files:
- ^.*node_modules(/.*)?
- ^src.*
- ^web.*
- ^.*\.pyc$
- ^.*\.map$
- ^\.git.*
- ^\.tmp/.*
- ^training/.*
- ^.DS_Store