Skip to content

Commit 0791848

Browse files
authored
Fix download images (#236)
* Fix download images related to Visual-Regression-Tracker/Visual-Regression-Tracker#417
1 parent b91ff6c commit 0791848

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ async function bootstrap() {
3737
// serve images
3838
app.useStaticAssets(join(process.cwd(), IMAGE_PATH), {
3939
maxAge: 31536000,
40+
// allow cors
41+
setHeaders: (res) => {
42+
res.set('Access-Control-Allow-Origin', '*');
43+
},
4044
});
4145

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

0 commit comments

Comments
 (0)