Skip to content

Commit

Permalink
Fix download images (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
pashidlos authored Sep 1, 2023
1 parent b91ff6c commit 0791848
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ async function bootstrap() {
// serve images
app.useStaticAssets(join(process.cwd(), IMAGE_PATH), {
maxAge: 31536000,
// allow cors
setHeaders: (res) => {
res.set('Access-Control-Allow-Origin', '*');
},
});

await app.listen(process.env.APP_PORT || 3000);
Expand Down

0 comments on commit 0791848

Please sign in to comment.