我尝试在服务器上进行cros设置:
export async function main(options: ApplicationConfig = {
rest: {
cors: {
origin: '*',
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
preflightContinue: false,
optionsSuccessStatus: 204,
maxAge: 86400,
credentials: true,
},
},
}) {
const app = new ApartmentManagementApplication(options);
...
}
但仍无法正常工作,请帮助我修复它。