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

HttpManager => Fix exercice secret header name

parent fd49131b
No related branches found
No related tags found
No related merge requests found
Pipeline #27168 failed
......@@ -530,7 +530,7 @@ components:
ExerciseChecker_Secret:
type: apiKey
in: header
name: ExerciseSecret
name: exercisesecret
parameters:
gitlabProjectIdOrNamespace:
name: gitlabProjectIdOrNamespace
......
{
"name" : "dojo_backend_api",
"description" : "Backend API of the Dojo project",
"version" : "3.1.0",
"version" : "3.1.1",
"license" : "AGPLv3",
"author" : "Michaël Minelli <dojo@minelli.me>",
"main" : "dist/src/app.js",
......
......@@ -31,7 +31,7 @@ class SecurityMiddleware {
isAllowed = isAllowed || (req.boundParams.assignment?.published ?? false);
break;
case SecurityCheckType.EXERCISE_SECRET:
isAllowed = isAllowed || (req.headers.ExerciseSecret as string | undefined) === req.boundParams.exercise!.secret;
isAllowed = isAllowed || (req.headers.exercisesecret as string | undefined) === req.boundParams.exercise!.secret;
break;
default:
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment