diff --git a/api-server/server/boot/settings.js b/api-server/server/boot/settings.js
index e3e0e7d17e..e2ce0e3646 100644
--- a/api-server/server/boot/settings.js
+++ b/api-server/server/boot/settings.js
@@ -26,13 +26,6 @@ export default function settingsController(app) {
createValidatorErrorHandler(alertTypes.danger),
updateMyCurrentChallenge
);
- api.post(
- '/update-my-current-challenge',
- ifNoUser401,
- updateMyCurrentChallengeValidators,
- createValidatorErrorHandler(alertTypes.danger),
- updateMyCurrentChallenge
- );
api.post('/update-my-portfolio', ifNoUser401, updateMyPortfolio);
api.post('/update-my-projects', ifNoUser401, updateMyProjects);
api.post(
diff --git a/api-server/server/middlewares/csp.js b/api-server/server/middlewares/csp.js
index 9837a09e88..335d9aa894 100644
--- a/api-server/server/middlewares/csp.js
+++ b/api-server/server/middlewares/csp.js
@@ -1,10 +1,11 @@
import helmet from 'helmet';
+import { homeLocation } from '../../../config/env';
+
let trusted = [
"'self'",
'https://search.freecodecamp.org',
- 'https://www.freecodecamp.rocks',
- 'https://api.freecodecamp.rocks',
+ homeLocation,
'https://' + process.env.AUTH0_DOMAIN
];
@@ -12,9 +13,7 @@ const host = process.env.HOST || 'localhost';
const port = process.env.SYNC_PORT || '3000';
if (process.env.NODE_ENV !== 'production') {
- trusted = trusted.concat([
- `ws://${host}:${port}`
- ]);
+ trusted = trusted.concat([`ws://${host}:${port}`, 'http://localhost:8000']);
}
export default function csp() {
@@ -73,11 +72,9 @@ export default function csp() {
'*',
'data:'
],
- mediaSrc: [
- '*.bitly.com',
- '*.amazonaws.com',
- '*.twitter.com'
- ].concat(trusted),
+ mediaSrc: ['*.bitly.com', '*.amazonaws.com', '*.twitter.com'].concat(
+ trusted
+ ),
frameSrc: [
'*.gitter.im',
'*.gitter.im https:',
diff --git a/client/src/redux/propTypes.js b/client/src/redux/propTypes.js
index 1cc9b65a5c..370e759001 100644
--- a/client/src/redux/propTypes.js
+++ b/client/src/redux/propTypes.js
@@ -22,7 +22,7 @@ export const ChallengeNode = PropTypes.shape({
block: PropTypes.string,
challengeType: PropTypes.number,
dashedName: PropTypes.string,
- description: PropTypes.arrayOf(PropTypes.string),
+ description: PropTypes.string,
files: PropTypes.shape({
indexhtml: FileType,
indexjs: FileType
@@ -34,6 +34,7 @@ export const ChallengeNode = PropTypes.shape({
guideUrl: PropTypes.string,
head: PropTypes.arrayOf(PropTypes.string),
challengeOrder: PropTypes.number,
+ instructions: PropTypes.string,
isBeta: PropTypes.bool,
isComingSoon: PropTypes.bool,
isLocked: PropTypes.bool,
diff --git a/client/src/templates/Challenges/backend/Show.js b/client/src/templates/Challenges/backend/Show.js
index eed9a32d70..4ba1dd4ee3 100644
--- a/client/src/templates/Challenges/backend/Show.js
+++ b/client/src/templates/Challenges/backend/Show.js
@@ -41,7 +41,7 @@ const reduxFormPropTypes = {
};
const propTypes = {
- description: PropTypes.arrayOf(PropTypes.string),
+ description: PropTypes.string,
executeChallenge: PropTypes.func.isRequired,
id: PropTypes.string,
output: PropTypes.string,
@@ -126,7 +126,8 @@ export class BackEnd extends Component {
challengeNode: {
fields: { blockName, slug },
title,
- description
+ description,
+ instructions
}
},
output,
@@ -145,7 +146,10 @@ export class BackEnd extends Component {