Skip to content

Instantly share code, notes, and snippets.

View chrisbloecker's full-sized avatar

Christopher Blöcker chrisbloecker

View GitHub Profile

Serving Flask under a subpath

Your Flask app object implements the __call__ method, which means it can be called like a regular function. When your WSGI container receives a HTTP request it calls your app with the environ dict and the start_response callable. WSGI is specified in PEP 0333. The two relevant environ variables are:

SCRIPT_NAME
The initial portion of the request URL's "path" that corresponds to the application object, so that the application knows its virtual "location". This may be an empty string, if the application corresponds to the "root" of the server.

@bishboria
bishboria / springer-free-maths-books.md
Last active December 14, 2025 11:48
Springer made a bunch of books available for free, these were the direct links