Skip to main content

Function: addCorsHeaders()

addCorsHeaders(response, origin): Response

Defined in: route-do-request.ts:141

Add CORS headers to a response if origin is allowed.

Parameters

response

Response

The response to add headers to

origin

string

The allowed origin to reflect

Returns

Response

New Response with CORS headers