Skip to content

Commit 1b148cc

Browse files
authored
Merge pull request #1488 from topcoder-platform/develop
v0.20.0 - Universal Nav, new features and UI for TopGear
2 parents af2ee4f + 02f388e commit 1b148cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3701
-933
lines changed

config/constants/development.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,8 @@ module.exports = {
4646
IDLE_TIMEOUT_MINUTES: 10,
4747
// duration to show the prompt saying user will be logged out, before actually logging out the user
4848
IDLE_TIMEOUT_GRACE_MINUTES: 5,
49-
MULTI_ROUND_CHALLENGE_TEMPLATE_ID: 'd4201ca4-8437-4d63-9957-3f7708184b07'
49+
MULTI_ROUND_CHALLENGE_TEMPLATE_ID: 'd4201ca4-8437-4d63-9957-3f7708184b07',
50+
UNIVERSAL_NAV_URL: '//uni-nav.topcoder-dev.com/v1/tc-universal-nav.js',
51+
HEADER_AUTH_URLS_HREF: `https://accounts-auth0.${DOMAIN}?utm_source=community-app-main`,
52+
HEADER_AUTH_URLS_LOCATION: `https://accounts-auth0.${DOMAIN}?retUrl=%S&utm_source=community-app-main`
5053
}

config/constants/production.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,8 @@ module.exports = {
4444
FILE_PICKER_CNAME: 'fs.topcoder.com',
4545
IDLE_TIMEOUT_MINUTES: 10,
4646
IDLE_TIMEOUT_GRACE_MINUTES: 5,
47-
MULTI_ROUND_CHALLENGE_TEMPLATE_ID: 'd4201ca4-8437-4d63-9957-3f7708184b07'
47+
MULTI_ROUND_CHALLENGE_TEMPLATE_ID: 'd4201ca4-8437-4d63-9957-3f7708184b07',
48+
UNIVERSAL_NAV_URL: '//uni-nav.topcoder.com/v1/tc-universal-nav.js',
49+
HEADER_AUTH_URLS_HREF: `https://accounts-auth0.${DOMAIN}?utm_source=community-app-main`,
50+
HEADER_AUTH_URLS_LOCATION: `https://accounts-auth0.${DOMAIN}?retUrl=%S&utm_source=community-app-main`
4851
}

package-lock.json

Lines changed: 19 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,8 @@
175175
},
176176
"devDependencies": {
177177
"standard": "^12.0.1"
178+
},
179+
"volta": {
180+
"node": "10.15.3"
178181
}
179182
}

server.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,22 @@ function check () {
1717
}
1818
app.use(healthCheck.middleware([check]))
1919
app.use((req, res, next) => {
20-
res.header('Referrer-Policy', 'strict-origin-when-cross-origin');
21-
res.header('Permissions-Policy', 'geolocation=(), microphone=(), camera=()');
22-
res.header('X-Content-Type-Options', 'nosniff');
23-
res.header('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload');
24-
res.header('Cache-control', 'public, max-age=0');
25-
res.header('Pragma', 'no-cache');
26-
res.setHeader('X-Frame-Options', 'DENY');
27-
res.setHeader('Content-Security-Policy', "frame-ancestors 'none';");
20+
res.header('Referrer-Policy', 'strict-origin-when-cross-origin')
21+
res.header('Permissions-Policy', 'geolocation=(), microphone=(), camera=()')
22+
res.header('X-Content-Type-Options', 'nosniff')
23+
res.header('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload')
24+
res.header('Cache-control', 'public, max-age=0')
25+
res.header('Pragma', 'no-cache')
26+
res.setHeader('X-Frame-Options', 'DENY')
27+
res.setHeader('Content-Security-Policy',
28+
"frame-ancestors 'none';" +
29+
"script-src 'report-sample' 'self' 'unsafe-inline' 'unsafe-eval'" +
30+
' https://uni-nav.topcoder-dev.com' +
31+
' https://uni-nav.topcoder.com'
32+
)
2833

29-
next();
30-
});
34+
next()
35+
})
3136
// app.use(requireHTTPS) // removed because app servers don't handle https
3237
// app.use(express.static(__dirname))
3338
app.use(express.static(path.join(__dirname, 'build')))

0 commit comments

Comments
 (0)