Skip to main content
Table of Contents

TTMSMCPStreamableHTTPTransport.CORSMaxAgeSeconds Property

How long a browser may reuse the result of one preflight check, in seconds. Defaults to 86400.

API unit family: TMS.MCP.Transport.StreamableHTTP Declaring type: TTMSMCPStreamableHTTPTransport Type: Integer

Syntax

TMS.MCP.Transport.StreamableHTTP.hppPascalC++
property CORSMaxAgeSeconds: Integer;
__property int CORSMaxAgeSeconds = {read=FCORSMaxAgeSeconds, write=FCORSMaxAgeSeconds, default=86400};

Default: 86400

Remarks

Purely a caching hint that saves a browser from repeating the preflight before every request. It does not permit an origin: which origins are allowed is decided by the channel's own origin check, which admits only an absent origin, localhost and 127.0.0.1 and cannot be widened by any property. A longer lifetime here never grants access that was not already granted.

Set it to zero or less to leave the hint out and have the browser preflight each time.