Skip to main content

Type Alias: CrossOriginHeaderPolicy

CrossOriginHeaderPolicy = (headers, hop) => OutgoingHttpHeaders

Chooses the request headers a hop to another origin sends: gets the headers the request is about to send (a copy) and returns the ones to send. A throw fails the request. Afterwards the request's own headers (ApiRequestOptions.ownHeaders) that it left out, and the default User-Agent and Cache-Control of configureRequestOptions, are added back.

Parameters​

headers​

OutgoingHttpHeaders

hop​

CrossOriginHop

Returns​

OutgoingHttpHeaders