Unit 'HTTPDefs' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TCORSSupport

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Cross-Origin Resource Sharing support

Declaration

Source position: httpdefs.pp line 727

type TCORSSupport = class(TPersistent)

public

  constructor Create; virtual;

  

Creates a new CORS support instance

  function ResolvedCORSAllowedOrigins(); virtual;

  

Resolves allowed origins for CORS requests

  function HandleRequest(); virtual;

  

Handles CORS request processing

  procedure Assign(); override;

  

Assigns CORS settings from another object

published

  property Enabled: Boolean; [rw]

  

Enables or disables CORS support

  property Options: TCORSOptions; [rw]

  

CORS configuration options

  property AllowedMethods: string; [rw]

  

HTTP methods allowed for CORS requests

  property AllowedOrigins: string; [rw]

  

Origins allowed for CORS requests

  property AllowedHeaders: string; [rw]

  

Headers allowed for CORS requests

  property MaxAge: Integer; [rw]

  

Maximum age for CORS preflight cache in seconds

end;

Inheritance

TCORSSupport

  

Cross-Origin Resource Sharing support

|

TPersistent

|

TObject,IFPObserved

Description

TCORSSupport provides functionality for handling CORS (Cross-Origin Resource Sharing) requests. It manages allowed origins, methods, headers, and other CORS-related settings.

See also

TCORSOptions

  

Set of CORS options

THandleCORSOptions

  

Set of CORS handling options


Documentation generated on: Jan 16 2026