mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 11:35:37 +01:00
fetched v.0.80.0
This commit is contained in:
commit
4d11d39278
31 changed files with 434 additions and 62 deletions
|
|
@ -3,9 +3,7 @@ const pkg = require('./package.json');
|
|||
module.exports = {
|
||||
env: {
|
||||
VERSION: pkg.version,
|
||||
},
|
||||
serverRuntimeConfig: {
|
||||
PROJECT_ROOT: __dirname,
|
||||
FORCE_SSL: !!process.env.FORCE_SSL,
|
||||
},
|
||||
webpack(config) {
|
||||
config.module.rules.push({
|
||||
|
|
@ -21,16 +19,11 @@ module.exports = {
|
|||
async headers() {
|
||||
return [
|
||||
{
|
||||
// mathching all API routes
|
||||
source: '/api/:path*',
|
||||
source: '/umami.js',
|
||||
headers: [
|
||||
{ key: 'Access-Control-Allow-Credentials', value: 'true' },
|
||||
{ key: 'Access-Control-Allow-Origin', value: '*' },
|
||||
{ key: 'Access-Control-Allow-Methods', value: 'GET,OPTIONS,PATCH,DELETE,POST,PUT' },
|
||||
{
|
||||
key: 'Access-Control-Allow-Headers',
|
||||
value:
|
||||
'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version',
|
||||
key: 'Cache-Control',
|
||||
value: 'public, max-age=2592000', // 30 days
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue