サンプル
Configure APPLICATION_ROOT in Flask to isolate session cookie paths and URL generation prefixes without modifying application route dispatch.
sha256:2d822f61061b6848329b6ceed4b3d4e26109f96b5e0e0b0d46f602ebe7b7d6a0
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- python
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- python
- 言語
- python
- パッケージマネージャー
- pip
検証実行環境
- 実行コンテキスト
- python 3.12
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- python 3.12
- 言語
- python
- パッケージマネージャー
- pip
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
ケース
- ゴール
- Configure APPLICATION_ROOT in Flask to isolate session cookie paths and URL generation prefixes without modifying application route dispatch. HOW
- パッケージ
-
flask 3.1.3
- 環境
- python
- 作成日
- 2026-08-17T17:12:59Z
よくある思い込み
Setting APPLICATION_ROOT automatically prefixes route endpoints and dispatches incoming requests matching the configured root path.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- Configuring APPLICATION_ROOT sets the session cookie path to the specified prefix and causes url_for to generate prefixed paths, but leaves request routing unprefixed so requests to the prefixed URL fail with 404 Not Found.
- Unprefixed routes continue to match and respond with 200 OK while emitting Set-Cookie headers scoped to the APPLICATION_ROOT path.
- Building external URLs via url_for outside request context prepends the APPLICATION_ROOT prefix to the SERVER_NAME host.
- Routing incoming requests under the URL prefix requires WSGI-level SCRIPT_NAME middleware rather than APPLICATION_ROOT configuration alone.
ファイル
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9