How to change cors setting of backend

Hi everybody. In my extension i am calling an external service in frontend but cors settings does not allow to do. How can i change cors setting?

[original thread by anil chalil]

@capacman Theia backend app is Express.js server. Your extension can use BackendApplicationContribution.configure lifecycle hook in order to configure cors policy: https://expressjs.com/en/resources/middleware/cors.html