runtime: python312

handlers:
# Redirect obsolete URLs.
# Blockly files moved from /blockly to /static on 5 Dec 2012.
- url: /blockly/.*
  static_files: redirect.html
  upload: redirect.html
# Code, Maze and Turtle moved from demos on 29 Dec 2012.
- url: /static/demos/(maze|turtle)/.*
  static_files: redirect.html
  upload: redirect.html
# Apps was disbanded on 20 Nov 2014.
- url: /static/apps/.*
  static_files: redirect.html
  upload: redirect.html
# Certain demos were moved on 25 Nov 2022.
- url: /static/demos/fixed/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/resizable/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/toolbox/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/maxBlocks/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/generator/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/headless/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/interpreter/step-execution.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/interpreter/async-execution.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/graph/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/rtl/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/custom-dialogs/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/custom-fields/turtle/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/custom-fields/pitch/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/mirror/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/plane/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/keyboard_nav/.*
  static_files: redirect.html
  upload: redirect.html
- url: /static/demos/custom-fields/.*
  static_files: redirect.html
  upload: redirect.html

# Blockly files.
- url: /static
  static_dir: static
  http_headers:
    Access-Control-Allow-Origin: "*"
  secure: always

# Storage API.
- url: /storage\.js
  static_files: storage.js
  upload: storage\.js
  secure: always

# Favicon.
- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico
  secure: always
  expiration: "30d"

# Apple icon.
- url: /apple-touch-icon\.png
  static_files: apple-touch-icon.png
  upload: apple-touch-icon\.png
  secure: always
  expiration: "30d"

# robot.txt
- url: /robots\.txt
  static_files: robots.txt
  upload: robots\.txt
  secure: always

# Dynamic content.
- url: /.*
  script: auto
  secure: always
