feat: add configurable transport-independent CORS policy

This commit is contained in:
2026-09-26 19:53:28 +08:00
parent 9fade3bedb
commit 800974cfff
33 changed files with 1645 additions and 23 deletions

137
reports/corsBrowser.json Normal file
View File

@@ -0,0 +1,137 @@
{
"browser": "Codex In-app Browser",
"passed": true,
"allowed": {
"allowedPage": true,
"passed": true,
"checks": [
{
"name": "simple GET",
"pass": true,
"status": 200,
"body": "hello"
},
{
"name": "401 readable",
"pass": true,
"status": 401,
"body": "{\"code\":\"LOGIN_REQUIRED\",\"message\":\"login required\",\"requestId\":\"8e1c6e6f5b5188f2409cc4ea8ef00b31\"}\n"
},
{
"name": "authorization preflight",
"pass": true,
"status": 200,
"body": "authenticated"
},
{
"name": "unknown header rejected",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "unknown method rejected",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "404 readable",
"pass": true,
"status": 404,
"body": "{\"code\":\"NOT_FOUND\",\"message\":\"route not found\",\"requestId\":\"6a0acbdabaa5e41d862f921dc2f9fdf3\"}\n"
},
{
"name": "credentials mode allowed",
"pass": true,
"status": 200,
"body": "hello"
},
{
"name": "wildcard without credentials",
"pass": true,
"status": 200,
"body": "public"
},
{
"name": "wildcard credentials blocked",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "exposed download header",
"pass": true,
"status": 200,
"body": "file bytes"
}
]
},
"denied": {
"allowedPage": false,
"passed": true,
"checks": [
{
"name": "simple GET",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "401 readable",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "authorization preflight",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "unknown header rejected",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "unknown method rejected",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "404 readable",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "credentials mode allowed",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "wildcard without credentials",
"pass": true,
"status": 200,
"body": "public"
},
{
"name": "wildcard credentials blocked",
"pass": true,
"blocked": true,
"error": "TypeError"
},
{
"name": "exposed download header",
"pass": true,
"blocked": true,
"error": "TypeError"
}
]
},
"scope": "20 loopback checks; credentials mode exercised without setting or inspecting cookies"
}