import * as express from 'express' ; import * as cors from 'cors' ; export const addCors = ( app , apiConfig ? ) : void => { if ( apiConfig ?. corsOptions ) { app . use ( cors ( apiConfig . corsOptions ) ) ; } } ;