cors to login

This commit is contained in:
Kornel Javor 2024-01-17 09:33:18 +01:00
parent 92d071cea2
commit ecff4e5244
5 changed files with 52 additions and 3 deletions

View file

@ -17,6 +17,22 @@ const headers = [
key: 'X-DNS-Prefetch-Control',
value: 'on',
},
{
key: 'Access-Control-Allow-Credentials',
value: 'true',
},
{
key: 'Access-Control-Allow-Origin',
value: '*',
},
{
key: 'Access-Control-Allow-Headers',
value: 'Content-Type',
},
{
key: 'Access-Control-Allow-Methods',
value: 'GET, OPTIONS, PATCH, DELETE, POST, PUT',
},
{
key: 'Content-Security-Policy',
value: contentSecurityPolicy
@ -26,6 +42,11 @@ const headers = [
},
];
headers.push({
key: 'Access-Control-Allow-Origin',
value: '*',
});
if (process.env.FORCE_SSL) {
headers.push({
key: 'Strict-Transport-Security',