feat: support cors
This commit is contained in:
@@ -18,4 +18,11 @@ export const sleep = (x: number, y?: number): Promise<void> => {
|
||||
logger.info(`Sleeping for ${timeout / 1000} seconds`);
|
||||
|
||||
return new Promise(resolve => setTimeout(resolve, timeout));
|
||||
}
|
||||
|
||||
|
||||
export const corsHeaders = {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
|
||||
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
|
||||
}
|
||||
Reference in New Issue
Block a user