diff --git a/code/lib/core-server/src/utils/getAccessControlMiddleware.ts b/code/lib/core-server/src/utils/getAccessControlMiddleware.ts index 8dec9da2d69..9eb8851e6a5 100644 --- a/code/lib/core-server/src/utils/getAccessControlMiddleware.ts +++ b/code/lib/core-server/src/utils/getAccessControlMiddleware.ts @@ -1,4 +1,6 @@ -export function getAccessControlMiddleware(crossOriginIsolated: boolean) { +import type { RequestHandler } from 'express'; + +export function getAccessControlMiddleware(crossOriginIsolated: boolean): RequestHandler { return (req, res, next) => { res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');