Skip to content
Snippets Groups Projects
Commit 162d44ac authored by michael.minelli's avatar michael.minelli Committed by michael.minelli
Browse files

HttpManager => Send secret on request to API

parent f937d43e
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,11 @@ class Config { ...@@ -13,7 +13,11 @@ class Config {
project: string; resultsVolume: string; resultsDojo: string; resultsExercise: string; project: string; resultsVolume: string; resultsDojo: string; resultsExercise: string;
}; };
public dockerhub!: { public readonly assignment: {
name: string; secret: string;
};
public readonly dockerhub: {
repositories: { repositories: {
assignmentChecker: string assignmentChecker: string
} }
...@@ -39,6 +43,11 @@ class Config { ...@@ -39,6 +43,11 @@ class Config {
}; };
this.resetResultsVolume(); this.resetResultsVolume();
this.assignment = {
name : process.env.DOJO_ASSIGNMENT_NAME || '',
secret: process.env.DOJO_ASSIGNMENT_SECRET || ''
};
this.dockerhub = { this.dockerhub = {
repositories: { repositories: {
assignmentChecker: getEnvVar('DOCKERHUB_ASSIGNMENT_CHECKER_REPOSITORY', '') assignmentChecker: getEnvVar('DOCKERHUB_ASSIGNMENT_CHECKER_REPOSITORY', '')
......
...@@ -41,6 +41,8 @@ class HttpManager { ...@@ -41,6 +41,8 @@ class HttpManager {
config.headers['Content-Type'] = 'multipart/form-data'; config.headers['Content-Type'] = 'multipart/form-data';
} }
config.headers.assignmentsecret = Config.assignment.secret;
config.headers['client'] = 'DojoAssignmentChecker'; config.headers['client'] = 'DojoAssignmentChecker';
config.headers['client-version'] = version; config.headers['client-version'] = version;
} }
......
Subproject commit 92008b25753c96bef9917cd39baab3a4d160cd9c Subproject commit 937081e68f6127b669daca30e57c43e73b9c96c9
Subproject commit e549c7f03955a2ac295a8b8486f921154af751ee Subproject commit eedbe869a561f6e9a3b02fa9374cee425af27946
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment