Skip to content

Instantly share code, notes, and snippets.

@jlandure
Last active December 7, 2018 20:45
Show Gist options
  • Select an option

  • Save jlandure/7082523 to your computer and use it in GitHub Desktop.

Select an option

Save jlandure/7082523 to your computer and use it in GitHub Desktop.
app.yaml with different cache for index.html (5m vs 30d for others resources)
runtime: python37
threadsafe: true
default_expiration: "30d"
handlers:
# re-direct to index.html if no path is give
- url: /
static_files: index.html
upload: index.html
expiration: "5m"
# re-direct to index.html
- url: /index.html(.*)
static_files: index.html
upload: index.html(.*)
expiration: "5m"
# access the static resources in the root director
- url: /(.*)
static_files: \1
upload: (.*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment