cors_simulate_fetch
Walk a redirect chain to judge CORS at each hop, reporting origin and credential changes, response headers, and the effective Access-Control-Max-Age.
Instructions
Walk a redirect chain hop by hop and judge each hop with the CORS check. Reports the ordered redirect events (origin_set_to_null, credentials_dropped), the visible response headers, and the effective Access-Control-Max-Age.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | target URL; only its origin is used | |
| mode | No | fetch mode; defaults to cors | |
| method | Yes | HTTP request method | |
| origin | No | request Origin; omit or null for a same-origin request | |
| response | Yes | ||
| redirects | No | ||
| credentials | No | credentials mode of the request | |
| is_preflight | No | is this the preflight response? | |
| request_headers | No | header name -> value |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hops | Yes | in occurrence order, not sorted | |
| events | Yes | in occurrence order, not sorted | |
| decision | Yes | ||
| final_type | Yes | ||
| visible_headers | Yes | lowercase header names, ASCII-sorted | |
| max_age_effective | Yes | whole seconds | |
| preflight_occurred | Yes | ||
| preflight_cache_key | Yes | per data/README.md section 4.7 |