mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Merge pull request #3350 from Maxime-J/fix-netlify
Fix Netlify and possible other cache issues
This commit is contained in:
commit
65e46a1885
2 changed files with 10 additions and 5 deletions
|
|
@ -9,6 +9,7 @@ const apiHeaders = {
|
|||
'Access-Control-Allow-Headers': '*',
|
||||
'Access-Control-Allow-Methods': 'GET, DELETE, POST, PUT',
|
||||
'Access-Control-Max-Age': process.env.CORS_MAX_AGE || '86400',
|
||||
'Cache-Control': 'no-cache',
|
||||
};
|
||||
|
||||
const trackerHeaders = {
|
||||
|
|
|
|||
|
|
@ -62,26 +62,30 @@ const trackerHeaders = [
|
|||
const apiHeaders = [
|
||||
{
|
||||
key: 'Access-Control-Allow-Origin',
|
||||
value: '*'
|
||||
value: '*',
|
||||
},
|
||||
{
|
||||
key: 'Access-Control-Allow-Headers',
|
||||
value: '*'
|
||||
value: '*',
|
||||
},
|
||||
{
|
||||
key: 'Access-Control-Allow-Methods',
|
||||
value: 'GET, DELETE, POST, PUT'
|
||||
value: 'GET, DELETE, POST, PUT',
|
||||
},
|
||||
{
|
||||
key: 'Access-Control-Max-Age',
|
||||
value: corsMaxAge || '86400'
|
||||
value: corsMaxAge || '86400',
|
||||
},
|
||||
{
|
||||
key: 'Cache-Control',
|
||||
value: 'no-cache',
|
||||
},
|
||||
];
|
||||
|
||||
const headers = [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
headers: apiHeaders
|
||||
headers: apiHeaders,
|
||||
},
|
||||
{
|
||||
source: '/:path*',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue