Skip to content

Commit ec9ac14

Browse files
committed
Merge branch 'master' into feat/clean-client-payment-instances-after-a-while
2 parents 5690c86 + 7bea95a commit ec9ac14

File tree

2 files changed

+55
-44
lines changed

2 files changed

+55
-44
lines changed

jobs/workers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ export const syncCurrentPricesWorker = async (queueName: string): Promise<void>
2020
}
2121
)
2222
worker.on('completed', job => {
23-
console.log(`syncing of ${job.data.syncType as string} prices finished`)
23+
console.log('syncing of current prices finished')
2424
})
2525

2626
worker.on('failed', (job, err) => {
2727
if (job !== undefined) {
28-
console.log(`syncing of ${job.data.syncType as string} prices FAILED`)
29-
console.log(`error for initial syncing of ${job.data.syncType as string} prices: ${err.message}`)
28+
console.log('syncing of current prices FAILED')
29+
console.log(`error for initial syncing of current prices: ${err.message}`)
3030
}
3131
})
3232
}

next.config.js

Lines changed: 52 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,56 @@
11
const paybuttonConfig = require('./paybutton-config.json')
22

33
const {
4-
PHASE_DEVELOPMENT_SERVER,
5-
PHASE_PRODUCTION_BUILD,
6-
PHASE_PRODUCTION_SERVER,
7-
} = require('next/constants')
8-
9-
// This uses phases as outlined here: https://nextjs.org/docs/#custom-configuration
10-
module.exports = (phase) => {
11-
// when started in development mode `next dev` or `npm run dev` regardless of the value of STAGING environmental variable
12-
const isDev = phase === PHASE_DEVELOPMENT_SERVER
13-
// when `next build` or `npm run build` is used
14-
const isBuild = phase === PHASE_PRODUCTION_BUILD && process.env.STAGING !== '1'
15-
// when `next start` or `npm run start` is used
16-
const isProd = phase === PHASE_PRODUCTION_SERVER
17-
// when `next build` or `npm run build` is used
18-
const isStaging =
19-
phase === PHASE_PRODUCTION_BUILD && process.env.STAGING === '1'
20-
21-
const branch = process.env.BRANCH || 'master'
22-
console.log(`branch: ${branch}\nisDev:${isDev} isBuild:${isBuild} isProd:${isProd} isStaging:${isStaging}`)
23-
24-
return {
25-
outputFileTracing: true,
26-
eslint: {
27-
ignoreDuringBuilds: true
28-
},
29-
typescript: {
30-
ignoreBuildErrors: true
31-
},
32-
async rewrites() {
33-
return [
34-
{
35-
source: '/:path*',
36-
destination: '/:path*',
37-
},
38-
{
39-
source: '/:path*',
40-
destination: `/api/:path*`,
41-
},
42-
]
43-
},
44-
}
4+
PHASE_DEVELOPMENT_SERVER,
5+
PHASE_PRODUCTION_BUILD,
6+
PHASE_PRODUCTION_SERVER,
7+
} = require('next/constants')
8+
9+
// This uses phases as outlined here: https://nextjs.org/docs/#custom-configuration
10+
module.exports = (phase) => {
11+
// when started in development mode `next dev` or `npm run dev` regardless of the value of STAGING environmental variable
12+
const isDev = phase === PHASE_DEVELOPMENT_SERVER
13+
// when `next build` or `npm run build` is used
14+
const isBuild = phase === PHASE_PRODUCTION_BUILD && process.env.STAGING !== '1'
15+
// when `next start` or `npm run start` is used
16+
const isProd = phase === PHASE_PRODUCTION_SERVER
17+
// when `next build` or `npm run build` is used
18+
const isStaging =
19+
phase === PHASE_PRODUCTION_BUILD && process.env.STAGING === '1'
20+
21+
const branch = process.env.BRANCH || 'master'
22+
console.log(`branch: ${branch}\nisDev:${isDev} isBuild:${isBuild} isProd:${isProd} isStaging:${isStaging}`)
23+
24+
return {
25+
outputFileTracing: true,
26+
eslint: {
27+
ignoreDuringBuilds: true
28+
},
29+
typescript: {
30+
ignoreBuildErrors: true
31+
},
32+
async headers () {
33+
return [
34+
{
35+
source: '/(.*)',
36+
headers: [
37+
{ key: 'X-Frame-Options', value: 'DENY' },
38+
{ key: 'Content-Security-Policy', value: "frame-ancestors 'none'" },
39+
],
40+
},
41+
]
42+
},
43+
async rewrites () {
44+
return [
45+
{
46+
source: '/:path*',
47+
destination: '/:path*',
48+
},
49+
{
50+
source: '/:path*',
51+
destination: `/api/:path*`,
52+
},
53+
]
54+
},
4555
}
56+
}

0 commit comments

Comments
 (0)