Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 712:collector_data_rest_api [2025/09/24 14:50] – Filpes, Claudia | 712:collector_data_rest_api [2026/02/18 09:33] (current) – [Cross-Origin Resource Sharing] Deutschmann, Niklas | ||
|---|---|---|---|
| Line 267: | Line 267: | ||
| </ | </ | ||
| + | ==== Cross-Origin Resource Sharing ==== | ||
| + | Starting with Stages 7.12.5, CORS (Cross-Origin Resource Sharing) can be configured for collector data API requests. This configuration change is **only** needed when another web application needs to make **client-side HTTP requests** to the API (because the same-origin policy is only enforced in web browsers) | ||
| + | The following configuration can be added to '' | ||
| + | <code xml> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <!-- URLs of the web applications (comma-separated) for which API requests should be allowed --> | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | **Testing your configuration: | ||
| + | |||
| + | The best way to test the configuration: | ||
| + | * Go to the website that should be the origin of the API requests (https:// | ||
| + | * Open the browser' | ||
| + | * In the " | ||
| + | |||
| + | < | ||
| + | fetch(" | ||
| + | </ | ||