Skip to content

Commit

Permalink
Revert "Add configurable ACCESS_CONTROL_ALLOW_ORIGIN header for CDN"
Browse files Browse the repository at this point in the history
This reverts commit bcb3e31.
  • Loading branch information
jmgasper committed Oct 1, 2023
1 parent 00ff23b commit fef1fae
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ workflows:
branches:
only:
- PROD-4183
- PROD-4372
- changelog
# This is alternate dev env for parallel testing
- "build-test":
Expand Down
1 change: 0 additions & 1 deletion config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module.exports = {
/* CDN configuration. */
CDN: {
PUBLIC: 'https://d1aahxkjiobka8.cloudfront.net',
ACCESS_CONTROL_ALLOW_ORIGIN: '*.topcoder-dev.com',
},

/* Time in MS to wait before refreshing challenge details after register
Expand Down
1 change: 0 additions & 1 deletion config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = {
},
CDN: {
PUBLIC: 'https://community-app-cdn.topcoder.com',
ACCESS_CONTROL_ALLOW_ORIGIN: '*.topcoder.com',
},
COOKIES: {
MAXAGE: 7,
Expand Down
2 changes: 1 addition & 1 deletion src/server/routes/cdn.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const url = path.resolve(__dirname, '../../../build');
/* Sets Access-Control-Allow-Origin header to avoid CORS error.
* TODO: Replace the wildcard value by an appropriate origin filtering. */
router.use('/public/static-assets', (req, res, next) => {
res.set('Access-Control-Allow-Origin', `${config.CDN.ACCESS_CONTROL_ALLOW_ORIGIN}`);
res.set('Access-Control-Allow-Origin', '*');
next();
}, express.static(url),

Expand Down

0 comments on commit fef1fae

Please sign in to comment.