fetched v.0.80.0

This commit is contained in:
Shubham Verma 2020-10-08 07:21:04 +05:30
commit 4d11d39278
31 changed files with 434 additions and 62 deletions

View file

@ -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
},
],
},