Skip to content

Commit 027b5a0

Browse files
Fix cors
1 parent 5a213cf commit 027b5a0

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

config/middlewares.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,30 @@ export default [
1717
"'self'",
1818
'data:',
1919
'blob:',
20-
'undershows.nyc3.cdn.digitaloceanspaces.com',
20+
'https://undershows.nyc3.cdn.digitaloceanspaces.com',
2121
],
2222
'frame-src': ["'self'", 'https:'],
2323
},
2424
},
2525
},
2626
},
27-
'strapi::cors',
27+
28+
{
29+
name: 'strapi::cors',
30+
config: {
31+
enabled: true,
32+
origin: [
33+
'http://localhost:4321',
34+
'http://127.0.0.1:4321',
35+
'https://shows.undershows.com.br',
36+
'https://cms.undershows.com.br',
37+
],
38+
methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'],
39+
headers: ['Content-Type', 'Authorization', 'Origin', 'Accept'],
40+
keepHeaderOnError: true,
41+
},
42+
},
43+
2844
'strapi::poweredBy',
2945
'strapi::logger',
3046
'strapi::query',

0 commit comments

Comments
 (0)