CORS Configuration
Configures Cross-Origin Resource Sharing (CORS) for the PowerTSM HTTP API — which origins are allowed to access it from a browser, and under what conditions.
Configuration Path
Section titled “Configuration Path”HAKOM:TSM:Http:Hosting:CorsConfiguration Structure
Section titled “Configuration Structure”Cors├─ Urls├─ Methods├─ Headers├─ ExposedHeaders└─ CredentialsQuick Start
Section titled “Quick Start”Allow a specific frontend to make authenticated requests:
<HAKOM> <TSM> <Http> <Hosting> <Cors> <Urls>https://my-frontend.example.com</Urls> <Methods>GET,POST,PUT,DELETE</Methods> <Headers>Content-Type,Authorization</Headers> <Credentials>true</Credentials> </Cors> </Hosting> </Http> </TSM></HAKOM>Configuration Elements
Section titled “Configuration Elements”| Element | Type | Default | Required | Description |
|---|---|---|---|---|
Urls |
string |
— | Allowed origin URLs. A wildcard value of * allows any origin. Empty by default. |
|
Methods |
string |
— | Allowed HTTP methods (GET, POST, …). A wildcard value of * allows any method. Empty by default. |
|
Headers |
string |
— | Allowed request headers. A wildcard value of * allows any header. Empty by default. |
|
ExposedHeaders |
string |
— | Response headers that should additionally be made visible to the client. There is no wildcard handling for this setting — a literal * is passed through as a header name rather than being treated as “any”. Empty by default. |
|
Credentials |
bool |
false |
Whether credentials (cookies, authorization headers) are allowed on cross-origin requests. |
Urls, Methods and Headers are each a single comma-separated string in configuration, split into a list internally.
Examples
Section titled “Examples”Allow any origin, method and header (development only)
Section titled “ Allow any origin, method and header (development only)”<Cors> <Urls>*</Urls> <Methods>*</Methods> <Headers>*</Headers></Cors>Important Notes
Section titled “Important Notes”Was this page helpful?Thanks for your feedback!