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

HttpManager => Send secret on request to API

parent 1bcb070a
No related branches found
No related tags found
No related merge requests found
Pipeline #31767 failed
......@@ -9,6 +9,10 @@ class Config {
project: string; resultsVolume: string; resultsDojo: string; resultsExercise: string;
};
public readonly assignment: {
name: string; secret: string;
};
public readonly dockerhub: {
repositories: {
assignmentChecker: string
......@@ -26,6 +30,11 @@ class Config {
};
this.resetResultsVolume();
this.assignment = {
name : process.env.DOJO_ASSIGNMENT_NAME || '',
secret: process.env.DOJO_ASSIGNMENT_SECRET || ''
};
this.dockerhub = {
repositories: {
assignmentChecker: process.env.DOCKERHUB_ASSIGNMENT_CHECKER_REPOSITORY || ''
......
......@@ -41,7 +41,7 @@ class HttpManager {
config.headers['Content-Type'] = 'multipart/form-data';
}
//config.headers.Authorization = `ExerciseSecret ${ Config.exercise.secret }`;
config.headers.assignmentsecret = Config.assignment.secret;
config.headers['client'] = 'DojoAssignmentChecker';
config.headers['client-version'] = version;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment