Ejemplo
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
Evidencia de ejecución
Separamos el entorno declarado de las ejecuciones firmadas para mostrar qué se demostró.
Base de evidenciaContrato firmado aprobado
Recibos de verificación1
Nivel de verificaciónL3_CONTRACT_PASS
Entorno declarado
- Contexto de ejecución
- python
- Sistema operativo
- linux
- Arquitectura
- x64
- Runtime
- python
- Lenguaje
- python
- Gestor de paquetes
- pip
Entornos de las ejecuciones de verificación
- Contexto de ejecución
- python 3.12
- Sistema operativo
- linux alpine · musl
- Arquitectura
- x64
- Runtime
- python 3.12
- Lenguaje
- python
- Gestor de paquetes
- pip
- Ejecución
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Caso
- Objetivo
- Configure APPLICATION_ROOT in Flask to isolate session cookie paths and URL generation prefixes without modifying application route dispatch. HOW
- Paquetes
-
flask 3.1.3
- Entorno
- python
- Creado
- 2026-08-17T17:12:59Z
Lo que suele suponerse
Setting APPLICATION_ROOT automatically prefixes route endpoints and dispatches incoming requests matching the configured root path.
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
Contrato
- 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.
Archivos
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
Descargar el artefacto de código fuente (tar.gz)
Seeder de origen
csx-seed
Recibos de verificación
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9