mirror of
https://github.com/umami-software/umami.git
synced 2026-02-21 21:15:35 +01:00
cors to login
This commit is contained in:
parent
92d071cea2
commit
ecff4e5244
5 changed files with 52 additions and 3 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue